With reference to the tree index of order shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query. "Get all records with a search key greater than or equal to and less than " is ______.

View worked solution
Answer: 5
To satisfy the query "greater than or equal to and less than " (i.e., ), we first search for the key from the root and then traverse the leaf nodes sequentially using sibling pointers.
The step-by-step node access is as follows:
- Root Node (contains 9): Since , we follow the left pointer to the child node.
- Internal Node (contains 5): Since , we follow the right pointer to the leaf node.
- First Leaf Node (contains 5, 7, 8): We retrieve the key and follow the leaf sibling pointer.
- Second Leaf Node (contains 9, 11): We retrieve the keys and , then follow the sibling pointer.
- Third Leaf Node (contains 13, 15): We retrieve the key (since ). Since is not strictly less than , the search terminates here.
Thus, the minimum number of nodes that must be fetched is 5.
Free practice · Your answers on this page are not saved.
