Data Structure


Q41.

Let T be a binary search tree with 15 nodes. The minimum and maximum possible heights of T are : Note: The height of a tree with a single node is 0.
GateOverflow

Q42.

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

Q43.

Consider the following binary search tree T given below: Which node contains the fourth smallest element in T?
GateOverflow

Q44.

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 tree?
GateOverflow

Q45.

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 n nodes?
GateOverflow

Q46.

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 numbers. What is the in-order traversal sequence of the resultant tree?
GateOverflow

Q47.

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
GateOverflow

Q48.

Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25 III. 2, 7, 10, 8, 14, 16, 20 IV. 4, 6, 7, 9 18, 20, 25
GateOverflow

Q49.

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

Q50.

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 _____. Note: The height of a tree with a single node is 0.
GateOverflow