In a binary min-heap containing $15$ distinct elements stored in a $1$-based array, the second smallest element must be located at one of the child nodes of the root. The number of possible indices where the second smallest element can be stored is _____________.
2.00
Step-by-Step Solution
Key idea: This is a direct concept recall question on secondary extrema location.
Step 1: In a min-heap, the smallest element is always at the root (index 1).
Step 2: The second smallest element must be greater than the root but smaller than or equal to all other elements.
Step 3: Because of the min-heap property (parent child), the second smallest cannot be a grandchild or deeper descendant, as its parent would be smaller than it, contradicting that it is the second smallest.
Step 4: Therefore, the second smallest must be a direct child of the root.
Step 5: In a 1-based array, the children of the root (index 1) are at indices 2 and 3.
Step 6: Thus, there are exactly 2 possible indices.
Answer: 2.00