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:
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?Questions Asked from Trees (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 2 (1)
GATE CSE 2024 Set 1 (1)
GATE CSE 2023 (2)
GATE CSE 2020 (2)
GATE CSE 2019 (1)
GATE CSE 2016 Set 2 (2)
GATE CSE 2014 Set 3 (3)
GATE CSE 2014 Set 2 (1)
GATE CSE 2012 (1)
GATE CSE 2011 (1)
GATE CSE 2009 (1)
GATE CSE 2008 (5)
GATE CSE 2007 (4)
GATE CSE 2006 (5)
GATE CSE 2005 (6)
GATE CSE 2004 (3)
GATE CSE 2002 (1)
GATE CSE 2000 (1)
GATE CSE 1998 (1)
GATE CSE 1997 (1)
GATE CSE 1996 (2)
GATE CSE 1991 (1)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages