1
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
The numbers 1, 2, ........, n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be
A
p
B
p + 1
C
n – p
D
n – p + 1
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Postorder traversal of a given binary search tree T produces the following sequence of keys 10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29 Which one of the following sequences of keys can be the result of an inorder traversal of the tree T?
A
9, 10, 15, 22, 23, 25, 27, 29, 40, 50, 60, 95
B
9, 10, 15, 22, 40, 50, 60, 95, 23, 25, 27, 29
C
29, 15, 9, 10, 25, 22, 23, 27, 40, 60, 50, 95
D
95, 50, 60, 40, 27, 23, 22, 25, 10, 9, 15, 29
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is
A
nk
B
(n – 1)k + 1
C
n(k – 1) + 1
D
n(k – 1)
4
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most 2. If the height of the tree is h > 0, then the minimum number of nodes in the tree is:
A
2h – 1
B
2h – 1 + 1
C
2h – 1
D
2h
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12