1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
A binary search tree contains the numbers 1, 2, 3, 4, 5, 6, 7, 8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained is 5, 3, 1, 2, 4, 6, 8, 7. If the tree is traversed in post-order, the sequence obtained would be
A
8, 7, 6, 5, 4, 3, 2, 1
B
1, 2, 3, 4, 8, 7, 6, 5
C
2, 1, 4, 3, 6, 7, 8, 5
D
2, 1, 4, 3, 7, 8, 6, 5
2
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)
3
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
4
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
How many distinct binary search trees can be created out of 4 distinct keys?
A
5
B
14
C
24
D
42
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