1
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C functions in which size is the number of elements in the array E:
int MyX(int *E, unsigned int size){
 int Y = 0;
 int Z;
 int i,j,k;
 for(i = 0; i < size; i++)
       Y = Y + E[i];
 for(i = 0; i < size; i++)
   for(j = i; j < size; j++){
     Z = 0;
     for(k = i; k <= j; k++)
        Z = Z + E[k];
     if(Z > Y)
        Y = X;
   }
   return Y;
}
The value returned by the function MyX is the
A
Maximum possible sum of elements in any sub-array of array E.
B
Maximum element in any sub-array of array E.
C
Sum of the maximum elements in all possible sub-arrays of array E.
D
The sum of all elements in the array E.
2
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider a hash table with 9 slots. The hash function is h(k) = k mod 9. The collisions are resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17, 10. The maximum, minimum, and average chain lengths in the hash table, respectively, are
A
3, 0, and 1
B
3, 3, and 3
C
4, 0, and 1
D
3, 0, and 2
3
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time of Depth First Search on G, when G is represented as an adjacency matrix?
A
$$\Theta(n)$$
B
$$\Theta(n+m)$$
C
$$\Theta(n^2)$$
D
$$\Theta(m^2)$$
4
GATE CSE 2014 Set 1
Numerical
+1
-0
Consider a rooted n node binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having exactly 4 nodes O(na Logbn ). Then the value of a + 10b is _________
Your input ____
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12