1
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6
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
A
Half of the product of the 3 consecutive integers.
B
One-third of the product of the 3 consecutive integers.
C
One-sixth of the product of the 3 consecutive integers.
D
None of the above.
2
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter.
MultiDequeue(Q){
   m = k
   while (Q is not empty and m  > 0) {
      Dequeue(Q)
      m = m - 1
   }
}
What is the worst case time complexity of a sequence of n operations on an initially empty queue?
A
$$\Theta (n)$$
B
$$Θ(n + k)$$
C
$$Θ(nk)$$
D
$$Θ(n^2)$$
3
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
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 function is
A
$$\Theta ({n^2})$$
B
$$\Theta(n^2\log n)$$
C
$$\Theta(n^3)$$
D
$$\Theta(n^3\log n)$$
4
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
A
O(n log n)
B
O(n2 log n)
C
O(n2 + log n)
D
O(n2)
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12