Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged gatebook-test-series
0
votes
1
answer
1
gatebook
Q2. int A(int) { if(n<=2) return 1; else return (A(√n)+n); } time complexity
Q2.int A(int){if(n<=2) return 1;elsereturn (A(√n)+n);} time complexity
amit166
204
views
amit166
asked
Sep 11, 2018
Algorithms
time-complexity
recurrence-relation
gatebook-test-series
+
–
0
votes
2
answers
2
gatebook
Q.1 int A(int n){ if(n==2) return 1; else{ for(int j=1;j<=n;j++) printf(" * "); return(A(√n)); } } Time complexity
Q.1 int A(int n){if(n==2) return 1;else{for(int j=1;j<=n;j++)printf(" * ");return(A(√n));}} Time complexity
amit166
335
views
amit166
asked
Sep 11, 2018
Algorithms
time-complexity
gatebook-test-series
+
–
2
votes
1
answer
3
gatebook mt2 qn 42
The intended purpose of this code is to precompute all the primes less than N. When it is finished executing, for r ∈ [2, N), bits[r] is supposed to equal 1 if and only if N is composite. Assume that the bits array is initialized to all zeroes. for ... composite." so why cant we just do a direct search? If it is 0 its prime, otherwise composite? What is the problem in this?
The intended purpose of this code is to precompute all the primes less than N. When it is finished executing, for r ∈ [2, N), bits[r] is supposed to equal 1 if and only...
Purple
332
views
Purple
asked
Feb 7, 2017
Algorithms
algorithms
time-complexity
gatebook-test-series
+
–
5
votes
1
answer
4
GateBook Mock Test_2(Compilers)
Consider these three grammars. Which of the following statements is not true? (A) If w can be generated by G1, then it can be generated by G2. (B) If w can be generated by G2, then it can be generated by G3. (C) If w can be generated by G3, then it can be generated by G1. (D) If w can be generated by G2, then it can be generated by G1.
Consider these three grammars.Which of the following statements is not true?(A) If w can be generated by G1, then it can be generated by G2.(B) If w can be generated by G...
smartmeet
913
views
smartmeet
asked
Feb 7, 2017
Compiler Design
gatebook-mt2
compiler-design
grammar
gatebook-test-series
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register