Similar questions 4 more →
Binary Search & Balanced Trees


Answer & solution
Answer: Impossible. (no official key was published)
A search path obeys every ancestor constraint, not merely the immediately preceding comparison. Maintain an open interval of permissible keys, initially (−∞,+∞). When a probe is below 43, searching right raises the lower bound to that probe. When a probe is above 43, searching left lowers the upper bound.
After 2, every later probe must lie in (2,+∞).
After 3, every later probe must lie in (3,+∞).
After 50, every later probe must lie in (3,50).
After 40, every later probe must lie in (40,50).
Probe 60 violates the inherited interval (40,50); the sequence is impossible.
The violated bound comes from an earlier ancestor. A later comparison cannot discard it: every node subsequently visited remains inside that ancestor’s chosen subtree. No choice of unvisited nodes can repair this path.