1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C - function:
double foo(int n){
 int i;
 double sum;
 if(n == 0) return 1.0;
 sum = 0.0;
 for (i = 0; i < n; i++){
  sum += foo(i);
 }
 return sum;
}
The space complexity of the above function is:
A
O(1)
B
O(n)
C
O(n!)
D
O(nn)
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Suppose there are $$\lceil \log n \rceil$$ sorted lists of $$\left\lfloor {{n \over {\log n}}} \right\rfloor $$ elements each. The time complexity of producing a sorted list of all these elements is :
(Hint : Use a heap data structure)
A
$$O(n \log \log n)$$
B
$$\Theta(n \log n)$$
C
$$\Omega(n \log n)$$
D
$$\Omega\left(n^{3/2}\right)$$
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Let G(V, E) an undirected graph with positive edge weights. Dijkstra's single-source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
A
$$O\left( {{{\left| V \right|}^2}} \right)$$
B
$$O\left(|E|+|V|\log |V|\right)$$
C
$$O\left(|V|\log|V|\right)$$
D
$$O\left(\left(|E|+|V|\right)\log|V|\right)$$
4
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1
Which one of the following is FALSE?
A
T(n) = O(n2)
B
$$T\left( n \right){\rm{ }} = {\rm{ }}\theta \left( {n{\rm{ }}\,log\,{\rm{ }}n} \right)$$
C
$$T\left( n \right){\rm{ }} = {\rm{ }}\Omega ({n^2})$$
D
T(n) = O(n log n)
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12