Binary Search & Balanced Trees

Answer & solution
Answer: B (no official key was published)
1. A balanced binary search tree has height O(log n). Follow left children to the minimum and delete/rebalance in O(log n). Search for a proposed key and, if absent, insert/rebalance along one root-to-leaf path in O(log n).
2. A min-heap can delete its root and sift down in O(log n), and can insert a known-new key in O(log n).
3. However, a heap is only partially ordered. Testing whether an arbitrary key already appears can require inspecting Θ(n) positions; insertion-if-absent includes that test.
4. Thus the balanced tree alone meets both requirements, B. A heap augmented with a separate search index is not the plain heap being compared.
Solution: A balanced binary search tree supports membership search, insertion, and deletion of its minimum in O(log n) worst-case time. A plain heap supports minimum deletion and unrestricted insertion in O(log n), but checking whether an arbitrary proposed value is already present may require Θ(n) comparisons. Therefore the uniqueness requirement rules out the heap alone, leaving B. Augmenting a heap with a separate membership structure is outside the listed plain-structure comparison.