Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Anjana5051
1
answer
1
GATE Electrical 2023 | GA Question: 4
A recent survey shows that $65 \%$ of tobacco users were advised to stop consuming tobacco. The survey also shows that $3$ out of $10$ tobacco users attempted to stop using tobacco. Based only on the information in the ... $65 \%$ of tobacco users successfully stopped consuming tobacco.
A recent survey shows that $65 \%$ of tobacco users were advised to stop consuming tobacco. The survey also shows that $3$ out of $10$ tobacco users attempted to stop us...
758
views
edited
Jun 26, 2023
Analytical Aptitude
gate2023-ee
analytical-aptitude
logical-reasoning
+
–
2
answers
2
Test Algorithms
What is the space complexity of the following code? $O(logn)$ $O(n)$ $O(nlogn)$ $O(1)$
What is the space complexity of the following code?$O(logn)$ $O(n)$$O(nlogn)$ $O(1)$
1.1k
views
retagged
Jul 16, 2022
Algorithms
algorithms
space-complexity
test-series
+
–
2
answers
3
Find the Space complexity of following Code [Ace Gate Practice Booklet Vol-1 Page 127]
Find the time and Space complexity of code below : void fun(n) { if (n==1) then call A(); else { fun(n/2); fun(n/2); call B(n); } } Please note that B(n) takes O(n) time and A(n) takes O(1) time respectively. ... above code would be : $T(n) = 2T(n/2)+O(n)$ which is $O(nlog(n))$ But What will be space complexity ?
Find the time and Space complexity of code below : void fun(n) { if (n==1) then call A(); else { fun(n/2); fun(n/2); call B(n); } } Please note that B(n) takes O(n) time ...
2.1k
views
edited
Jul 16, 2022
Algorithms
space-complexity
algorithms
ace-booklet
+
–
2
answers
4
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
336
views
retagged
Jul 16, 2022
Algorithms
time-complexity
gatebook-test-series
+
–
3
answers
5
class test
m=1; for i=1 to n do begin m=m*3; for j=1 to m do {Something which is O(1)} What is the complexity of above algorithm? 1. O(n*m3) 2. O(n3) 3. O(3n) 4. O(3m)
m=1;for i=1 to n do begin m=m*3; for j=1 to m do {Something which is O(1)}What is the complexity of above algorithm?1. O(n*m3)2. O(n3)3. O(3n)...
651
views
retagged
Jul 16, 2022
Algorithms
algorithms
time-complexity
test-series
+
–
2
answers
6
Time Complexity
1.6k
views
retagged
Jul 16, 2022
Algorithms
algorithms
time-complexity
test-series
+
–
1
answer
7
MIT_algorithms
I don't understand How?
I don't understand How?
514
views
retagged
Jul 16, 2022
Algorithms
time-complexity
algorithms
mit-quiz
+
–
1
answer
8
MIT assignment Doubt
How the worst case of merge sort is O(n^2) according to the given MIT assignment pdf:- explain ?
How the worst case of merge sort is O(n^2) according to the given MIT assignment pdf:-explain ?
653
views
retagged
Jul 16, 2022
Algorithms
algorithms
time-complexity
mit-quiz
+
–
3
answers
9
MIT Course
For each group of functions, sort the functions in increasing order of asymptotic (big-O) complexity: ... its an exponential function, but since the power is to 1.000001, it is growing very slowly, since base is tending to 1 only. Someone please check this.
For each group of functions, sort the functions in increasing order of asymptotic (big-O) complexity:$\begin{align*} &(a) \;\;f1(n) = n^{0.999999} * \log n \\ &(b) \;\;f2...
7.1k
views
retagged
Jul 16, 2022
Algorithms
time-complexity
algorithms
mit-quiz
+
–
2
answers
10
MIT ASSIGNMENT
FIND THE TIME COMPLEXITY int i=1,j; for(;i <= n;i + +) { for(j = i; j <= nlogn; j∗= 2) { sum++; } }
FIND THE TIME COMPLEXITYint i=1,j; for(;i <= n;i + +) { for(j = i; j <= nlogn; j∗= 2) { sum++; } }
851
views
retagged
Jul 16, 2022
Algorithms
algorithms
time-complexity
mit-quiz
+
–
2
answers
11
MIT ASSIGNMENT
Find the complexity of the following function when called with some integer n: void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k = 1 ; k <= j ; k++) { x=x+10; } }
Find the complexity of the following function when called with some integer n:void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k ...
774
views
retagged
Jul 16, 2022
Algorithms
algorithms
time-complexity
mit-quiz
+
–
1
answer
12
MIT assignment
Find the complexity of the following code fragment: int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
Find the complexity of the following code fragment:int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
913
views
retagged
Jul 16, 2022
Algorithms
time-complexity
algorithms
mit-quiz
+
–
1
answer
13
Finding complexity in case ratio of two compexity is constant.
Given two positive functions f(n) and g(n). If $\frac{f(n)}{g(n)}=c$, for some constant c ≥ 0 and c is non-negative but not infinite then which of the following is correct? f(n) = O(g(n)) f(n) = θ (g(n)) ... are of same order. In that case they are both upper & lower bounds of each other ! Q 47 From Made Easy FLT 6-Practice Test 14
Given two positive functions f(n) and g(n). If $\frac{f(n)}{g(n)}=c$, for some constant c ≥ 0 and c is non-negative but not infinite then which of the following is corr...
700
views
edited
Jul 16, 2022
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
1
answer
14
Advance test algorithms
Is there Any short cut to do these questions fast ?
Is there Any short cut to do these questions fast ?
637
views
retagged
Jul 16, 2022
Algorithms
time-complexity
test-series
+
–
1
answer
15
MIT QUIZ
592
views
edited
Jul 16, 2022
Algorithms
uniform-hashing
mit-quiz
+
–
1
answer
16
MIT QUIZ
plz explain otherwise i ll memorize it..
plz explain otherwise i ll memorize it..
408
views
retagged
Jul 16, 2022
Algorithms
uniform-hashing
mit-quiz
+
–
1
answer
17
NPTEL Assignment
10 rooms, numbered 1 to 10, need to be rewired, but there are constraints on the order in which this can get done. Rooms 5 and 8 must be rewired before starting on 6 Room 1 must be rewired rewired before starting on 7 and 9 Rooms 4 and 5 must be rewired before starting ... and 3-1-7-10-8-5-2 each of length 7." <--quoted from answer How is it done?How is it connected to DAG?
10 rooms, numbered 1 to 10, need to be rewired, but there are constraints on the order inwhich this can get done.Rooms 5 and 8 must be rewired before starting on 6Room 1 ...
1.3k
views
retagged
Jul 16, 2022
Algorithms
algorithm-design
topological-sort
nptel-quiz
+
–
3
answers
18
Calculating number of tokens
Given solution: Please explain how the number of tokens are 11.
Given solution:Please explain how the number of tokens are 11.
19.0k
views
retagged
Jul 16, 2022
Compiler Design
compiler-tokenization
compiler-design
testbook-test-series
numerical-answers
+
–
1
answer
19
according to me answer should be 3. give correct explanation.
356
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
context-free-grammar
numerical-answers
test-series
+
–
2
answers
20
Complier Design Test 1.1
Ques. S --> Aa/bAc/dc A --> d Which of them is correct. Please provide detailed information. a) LALR(1) but not SLR(1) b) Both SLR(1) and LALR(1) c) Grammar is Ambiguous d) Neither SLR(1) NOR LALR(1)
Ques. S Aa/bAc/dc A dWhich of them is correct. Please provide detailed information.a) LALR(1) but not SLR(1)b) Both SLR(1) and LALR(1)c) Grammar is Ambiguo...
893
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
parsing
lr-parser
ambiguous-grammar
test-series
+
–
0
answers
21
dag
Here is a sequence of twelve array assignments and references: r = a[i] s = a[j] t = a[i] a[j] = b u = a[i] v = a[j] a[j] = c w = a[i] x = a[j] y = a[i] z = a[j] a[j] = b Construct the DAG for these instructions. Which of the following pairs of variables label the same node of the DAG? a) t and u b) r and s c) w and y d) t and s
Here is a sequence of twelve array assignments and references:r = a[i]s = a[j]t = a[i]a[j] = bu = a[i]v = a[j]a[j] = cw = a[i]x = a[j]y = a[i]z = a[j]a[j] = bConstruct th...
584
views
edited
Jul 16, 2022
Compiler Design
compiler-design
code-optimization
directed-acyclic-graph
test-series
+
–
2
answers
22
VirtualGate-2018-I-19
Consider the grammar given S->AA A->aA / b How many entries will be blank in the GOTO table for SR(0) items? What is the meaning of SR(0) items?
Consider the grammar givenS->AAA->aA / bHow many entries will be blank in the GOTO table for SR(0) items?What is the meaning of SR(0) items?
1.4k
views
retagged
Jul 16, 2022
Compiler Design
parsing
grammar
virtual-gate-test-series
+
–
1
answer
23
When to shift and when to reduce?
In the above grammar, 1. how to determine the precedence of the operator? 2. If there is shift and reduce conflict, in who's favor to resolve? 3. Why are we not reducing E-->E+E, instead we are shifting. But incase of E-->id, we are reducing.
In the above grammar,1. how to determine the precedence of the operator?2. If there is shift and reduce conflict, in who's favor to resolve?3. Why are we not reducing E >...
653
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
parsing
grammar
test-series
+
–
1
answer
24
LR(zero)
Options are as:- (a) i and ii (b) i and iii (c) ii and iii (d) none of the above
Options are as:-(a) i and ii (b) i and iii(c) ii and iii (d) none of the above
534
views
retagged
Jul 16, 2022
Compiler Design
theory-of-computation
grammar
compiler-design
context-free-language
ace-test-series
+
–
1
answer
25
#compiler
417
views
retagged
Jul 16, 2022
Compiler Design
grammar
ace-test-series
+
–
1
answer
26
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...
915
views
retagged
Jul 16, 2022
Compiler Design
gatebook-mt2
compiler-design
grammar
gatebook-test-series
+
–
1
answer
27
Test series
Consider the following statements: S1: Writing "int main" as "intmain" in a C program shall result in lexical error. S2: Writing "int main" as "intmain" in a C program shall not result in lexical errors as compilers discard white spaces. Which of the above statements is /are true?
Consider the following statements:S1: Writing "int main" as "intmain" in a C program shall result in lexical error.S2: Writing "int main" as "intmain" in a C program shal...
473
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
lexical-analysis
test-series
+
–
1
answer
28
DRDO 2009
A variable X has been assigned fresh values in statements numbered 6, 9 and 12 in a 25- statement program which does not have any jump instructions.This variable is used in statements numbered 7, 8, 10, 16 and 17.the statement range where the register, used by the variable X, could be assigned to ... variable are- (A.) 8-9, 10- 12, 17- 25 (B.) 11, 18-25 (C.) 17-25 (D.) Non of the above
A variable X has been assigned fresh values in statements numbered 6, 9 and 12 in a 25- statement program which does not have any jump instructions.This variable is used ...
2.3k
views
edited
Jul 16, 2022
Compiler Design
live-variable-analysis
drdo-2009
+
–
2
answers
29
Compiler design
309
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
parsing
lr-parser
ambiguous
ll-parser
test-series
+
–
1
answer
30
Compiler
328
views
retagged
Jul 16, 2022
Compiler Design
compiler-design
grammar
parsing
lr-parser
ll-parser
ace-test-series
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register