Similar questions 4 more →
Binary Search & Balanced Trees


Answer & solution
Answer: Possible. (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 10, every later probe must lie in (10,+∞).
After 65, every later probe must lie in (10,65).
After 31, every later probe must lie in (31,65).
After 48, every later probe must lie in (31,48).
After 37, every later probe must lie in (37,48).
The final probe is 43, so the search succeeds.
All probes meet the bounds. A witnessing BST can be built as a chain with these keys, taking the left or right child according to each comparison with 43. Thus the bound test proves existence, rather than just failing to find an error.