1
GATE CSE 2016 Set 2
MCQ (Single Correct Answer)
+2
-0.6
Consider the following $$New-order$$ strategy for traversing a binary tree:

$$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the root;
$$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the right subtree using $$New-order;$$
$$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the left subtree using $$New-order;$$

The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:

A
+ - 1 6 7 * 2 ^ 5 - 3 4 *
B
- + 1 * 6 7 ^ 2 - 5 * 3 4
C
- + 1 * 7 6 ^ 2 - 5 * 4 3
D
1 7 6 * + 2 5 4 3 * - ^ - New-order;
2
GATE CSE 2016 Set 2
Numerical
+2
-0
The number of ways in which the numbers $$1, 2, 3, 4, 5, 6, 7$$ can be inserted in an empty binary search tree, such that the resulting tree has height $$6,$$ is _____________.

$$Note:\,\,\,The\,\,height\,\,of\,\,a\,tree\,\,with\,\,a\,\,\sin gle\,\,node\,\,is\,\,0$$

Your input ____
3
GATE CSE 2014 Set 3
Numerical
+2
-0
Suppose we have a balanced binary search tree T holding n numbers. We are given two numbers L and H and wish to sum up all the numbers in T that lie between L and H. Suppose there are m such numbers in T. If the tightest upper bound on the time to compute the sum is O( na logb n + mc logd n ), the value of a + 10b + 100c + 1000d is _______.
Your input ____
4
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the C function given below. Assume that the array listA contains n (> 0) elements, sored in ascending order.
int ProcessArray(int *listA, int x, int n) 
{ 
      int i, j, k; 
      i = 0; 
      j = n-1; 
      do 
      { 
         k = (i+j)/2; 
         if (x <= listA[k]) 
           j = k-1; 
         if (listA[k] <= x) 
           i = k+1; 
      } 
      while (i <= j); 
      if (listA[k] == x) 
           return(k); 
      else 
           return -1; 
}
Which one of the following statements about the function ProcessArray is CORRECT?
A
It will run into an infinite loop when x is not in listA
B
It is an implementation of binary search.
C
It will always find the maximum element in listA.
D
It will return −1 even when X is present in listA.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12