Computer Sciences > GATE 2026 SET-2 > Data Structures
Consider a binary search tree (BST) with π leaf nodes (π>0). Given any node π,
the key present in the node is denoted as πππ(π). All the keys present in the given
BST are distinct. The keys belong to the set of real numbers.
For a node π, let ππ’π(π) denote the node that is its inorder successor. If a node π
does not have an inorder successor, then ππ’π(π) is πππΏπΏ. As there are no
duplicates, if ππ’π(π) is not πππΏπΏ, then πππ(π) <πππ(ππ’π(π)).
Corresponding to every leaf node πΏπ that has a non-NULL ππ’π(πΏπ), a new key ππ with the following property is to be inserted into the BST.
Vππ(πΏπ)< ππ< πππ(ππ’π(πΏπ))
Let πΎ represent the list of all such new keys to be inserted into the BST. Which of the following statements is/are true?
Corresponding to every leaf node πΏπ that has a non-NULL ππ’π(πΏπ), a new key ππ with the following property is to be inserted into the BST.
Vππ(πΏπ)< ππ< πππ(ππ’π(πΏπ))
Let πΎ represent the list of all such new keys to be inserted into the BST. Which of the following statements is/are true?
Correct : b,c
Similar Questions
Which one of the following sequences when stored in an array at locations
A[1],...,A[10] forms a max-heap?
Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be...
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let...
Total Unique Visitors
Loading......