Time Left - 15:00 mins

GATE 2020 : Programming & Data Structures Quiz 10

Attempt now to get your rank among 668 students!

Question 1

Consider the following traversals of binary tree T.
Inorder: A, B, C, D, E, F, G
Postorder: B, A, D, C, G, F, E
What is the height of the tree (assume root is present at height 0)?

Question 2

What are the worst-case complexities of insertion and deletion of a key in a binary search tree?

Question 3

What is sum of the minimum number of nodes in the AVL tree of height 5? (Assume root node is present at height zero).

Question 4

Consider the following BST.

Its pre-order and post-order are inserted in two separate arrays(arrays having same starting index) of same size in traversal sequence. How many elements will have same index numbers in the both the arrays?

Question 5

Suppose we have a balanced binary search tree T holding n numbers. We are given two numbers L and H and wish to sum up all the numbers in T that lie between L and H. Suppose there are m such numbers in T. If the tightest upper bound on the time to compute the sum is O(na logb n + mc logd n), the value of a + 10b + 100c + 1000d is ________.

Question 6

What is the maximum number of Binary Search Trees possible with 6 nodes?
  • 668 attempts
  • 1 upvote
  • 7 comments
Mar 25GATE & PSU CS