Concept drill
loop complexity
GATE CSE & IT · Complexity Theory · 2013-2014
2
PYQs
100%
keyed
0
elite explanations
2
years appeared
Study anchor
Cormen et al. — Introduction to Algorithms (CLRS)
Algorithms, data structures, graph algorithms, complexity
Practice action
Start latest PYQPYQs in this concept
All concepts →2014 PYQ
Consider the following pseudo code. What is the total number of multiplications to be performed? D = 2 for i = 1 to n do for j = i to n do for k = j + 1 to n do D = D * 3
mediumanswer key
2013 PYQ
Consider the following function: int unknown(int n) { int i, j, k = 0; for (i = n/2; i <= n; i++) for (j = 2; j <= n; j = j * 2) k = k + n/2; return k; } The return value of the fu...
mediumanswer key