Skip to content

GATE CS Binary Search Trees questions

Practise Binary Search Trees questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2025Programming and Data StructuresBinary Search TreesMSQ · 1 mark
Which of the following statement(s) is/are TRUE for any binary search tree (BST) having nn distinct integers?
Official PYQ2025Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose the values 10,−4,15,30,20,5,60,1910,-4,15,30,20,5,60,19 are inserted in that order into an initially empty binary search tree. Let TT be the resulting binary search tree. The number of edges in the path from the node containing 1919 to the root node of TT is _________. (Answer in integer)
Official PYQ2024Programming and Data StructuresBinary Search TreesMCQ · 2 marks
​​​​​​You are given a set VV of distinct integers. A binary search tree TT is created by inserting all elements of VV one by one, starting with an empty tree. The tree TT follows the convention that, at each node, all values stored in the left subtree of the node are smaller than the value stored at the node. You are not aware of the sequence in …
Official PYQ2022Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose a binary search tree with 10001000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0,0, the 3rd3^{\text{rd}} largest element of the tree is stored at index ______________ .
Official PYQ2021Programming and Data StructuresBinary Search TreesMCQ · 1 mark
A binary search tree TT contains nn distinct elements. What is the time complexity of picking an element in TT that is smaller than the maximum element in TT?
Official PYQ2020Programming and Data StructuresBinary Search TreesMCQ · 1 mark
The preorder traversal of a binary search tree is 15,10,12,11,20,18,16,1915, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?
Official PYQ2020Programming and Data StructuresBinary Search TreesMCQ · 2 marks
In a balanced binary search tree with nn elements, what is the worst case time complexity of reporting all elements in range [a,b][a,b]? Assume that the number of reported elements is kk.
Official PYQ2017Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Let TT be a binary search tree with 1515 nodes. The minimum and maximum possible heights of TT are: Note: The height of a tree with a single node is 00.
Official PYQ2017Programming and Data StructuresBinary Search TreesMCQ · 1 mark
The pre-order traversal of a binary search tree is given by 12,8,6,2,7,9,10,16,15,19,17,2012, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is
Official PYQ2016Programming and Data StructuresBinary Search TreesNAT · 1 mark
The number of ways in which the numbers 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 66, is _________. Note: The height of a tree with a single node is 00.
Official PYQ2015Programming and Data StructuresBinary Search TreesMCQ · 1 mark
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
Official PYQ2015Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Which of the following is/are correct in order traversal sequence(s) of binary search tree(s)? 3,5,7,8,15,19,253, 5, 7, 8, 15, 19, 25 5,8,9,12,10,15,255, 8, 9, 12, 10, 15, 25 2,7,10,8,14,16,202, 7, 10, 8, 14, 16, 20 4,6,7,9,18,20,254, 6, 7, 9, 18, 20, 25
Official PYQ2015Programming and Data StructuresBinary Search TreesMCQ · 1 mark
While inserting the elements 71,65,84,69,67,8371, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
Official PYQ2014Programming and Data StructuresBinary Search TreesNAT · 1 mark
Suppose we have a balanced binary search tree TT holding nn numbers. We are given two numbers LL and HH and wish to sum up all the numbers in TT that lie between LL and HH. Suppose there are mm such numbers in TT. If the tightest upper bound on the time to compute the sum is O(nalog⁡bn+mclog⁡dn)O(n^a\log^bn+m^c\log^dn), the value of …
Official PYQ2013Programming and Data StructuresBinary Search TreesMCQ · 1 mark
The preorder traversal sequence of a binary search tree is 30,20,10,15,25,23,39,35,4230, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?
Official PYQ2013Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of nn nodes?
Official PYQ2012Programming and Data StructuresBinary Search TreesMCQ · 1 mark
The worst case running time to search for an element in a balanced binary search tree with n2nn2^{n} elements is
Official PYQ2009Programming and Data StructuresBinary Search TreesMCQ · 1 mark
What is the maximum height of any AVL-tree with 77 nodes? Assume that the height of a tree with a single node is 00.
Official PYQ2008Programming and Data StructuresBinary Search TreesMCQ · 1 mark
You are given the postorder traversal, PP, of a binary search tree on the nn elements 1,2,…,n1, 2, \dots, n. You have to determine the unique binary search tree that has PP as its postorder traversal. What is the time complexity of the most efficient algorithm for doing this?
Official PYQ2005Programming and Data StructuresBinary Search TreesMCQ · 1 mark
How many distinct binary search trees can be created out of 44 distinct keys?