Binary Search Tree: GATE CS Previous Year Questions

Binary Search Tree · Data Structures

32 questions · asked in 17 of 27 years (2000–2026)

MCQ 26 · MSQ 2 · NAT 41-mark 20 · 2-mark 12

2000Questions per year2026

Questions 26–30 of 32

Q26GATE 20051 markMCQ−0.33 if wrong
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

Q27GATE 20051 markMCQ−0.33 if wrong
The numbers 1,2,.…n1, 2, .\dots 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

Q28GATE 20051 markMCQ−0.33 if wrong
How many distinct binary search trees can be created out of 4 distinct keys?

Q29GATE 20051 markMCQ−0.33 if wrong
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 in-order traversal of the tree T?

Q30GATE 20041 markMCQ−0.33 if wrong
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?

Keep practising

Topics in Data Structures

All CS topics ›