Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

bst

GATE CSE & IT · Data Structures · 1991-2025

20
PYQs
90%
keyed
2
elite explanations
15
years appeared

Study anchor

Cormen et al. — Introduction to Algorithms (CLRS)

Algorithms, data structures, graph algorithms, complexity

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2025 Q26

Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?

mediumanswer key
2025 PYQ

A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P: Unsorted doubly...

mediumanswer keyelite explanation
2024 Q39

You are given a set V of distinct integers. A binary search tree T is created by inserting all elements of V one by one, starting with an empty tree. The tree T follows the convent...

mediumanswer key
2020 PYQ

In a balanced binary search tree with n elements, what is the worst case time complexity of reporting all elements in range [a, b]? Assume that the number of reported elements is k...

mediumanswer keybasic explanation
2020 PYQ

The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

easyanswer keybasic explanation
2019 PYQ

Consider the following statements : I. The smallest element in a max-heap is always at a leaf node II. The second largest element in a max-heap is always a child of the root node I...

mediumanswer keybasic explanation
2016 PYQ

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 _____________. $$N...

medium
2015 PYQ

While inserting the elements $$71, 65, 84, 69, 67, 83$$ in an empty binary search tree $$(BST)$$ in the sequence shown, the element in the lowest level is

easyanswer key
2013 PYQ

Which one of the following is the tightest upper bound that represents the time complexity of inserting an object in to a binary search tree of n nodes?

easyanswer keyelite explanation
2011 PYQ

We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search...

mediumanswer key
2008 PYQ

How many distinct BSTs can be constructed with 3 distinct keys?

easyanswer key
2008 PYQ

A Binary Search Tree (BST) stores values in the range 37 to 573. Consider the following sequence of keys. I. 81, 537, 102, 439, 285, 376, 305 II. 52, 97, 121, 195, 242, 381, 472 II...

mediumanswer key
2008 PYQ

You are given the postorder traversal, P, of a binary search tree on the n elements 1, 2,..........., n. You have to determine the unique binary search tree that has P as its posto...

mediumanswer key
2007 PYQ

When searching for the key value 60 in a binary search tree, nodes containing the key values 10, 20, 40, 50, 70 80, 90 are traversed, not necessarily in the order given. How many d...

hardanswer key
2006 PYQ

Suppose that we have numbers between 1 and 100 in a binary search tree and want to search for the number 55. Which of the following sequences CANNOT be the sequence of nodes examin...

mediumanswer key
2005 PYQ

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 i...

mediumanswer key
2005 PYQ

How many distinct binary search trees can be created out of 4 distinct keys?

easyanswer key
2003 PYQ

Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural nu...

easyanswer key
1997 PYQ

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 outpu...

mediumanswer key
1991 PYQ

Obtain the optimal binary search tree with equal probabilities for the identifier set (a 1 , a 2 , a 3 ) = ( if, stop, while)

medium