1
GATE CSE 2002
MCQ (Single Correct Answer)
+2
-0.6
The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is:
A
n/2
B
(n-1)/3
C
(n-1)/2
D
(2n+1)/3
2
GATE CSE 2000
MCQ (Single Correct Answer)
+2
-0.6
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal. Respectively, of a complete binary tree. Which of the following is always tree?
A
LASTIN = LASTPOST
B
LASTIN = LASTPRE
C
LASTPRE = LASTPOST
D
None of the above
3
GATE CSE 1998
MCQ (Single Correct Answer)
+2
-0.6
A complete n-ary tree is one in which every node has O or n sons. If x is the number of internal nodes of a complete n-ary tree, the number of leaves in it is given by
A
x(n – 1) +1
B
xn - 1
C
xn + 1
D
x(n+1)
4
GATE CSE 1997
MCQ (Single Correct Answer)
+2
-0.6
A binary search tree contains the value 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid output?
A
5 3 1 2 4 7 8 6
B
5 3 1 2 6 4 8 7
C
5 3 2 4 1 6 7 8
D
5 3 1 2 4 7 6 8
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12