Problem context and objectives
Mission briefing
Archive pathfinder · Clues branch through a living archive
Explore only the branches that can still contain the answer: The Ordered Grove.
Ignoring the parent-child rule turns a focused search into a full maze traversal.
How you win
- 1Recognize when Validate binary search tree matches the clues
- 2Keep this true after every move: every recursive call's node must lie strictly inside the bounds imposed by all ancestors
- 3Reach the result within O(n) time and O(height) space
Rules and pressure
- Target cost: O(n) time and O(height) space
- State rule: every recursive call's node must lie strictly inside the bounds imposed by all ancestors
Lesson 1 of 3
Predict each node's inherited open interval. A parent-only comparison can miss an older ancestor boundary. Lesson questions refer to the original tree.
Catch the parent-only trap with the 3D gates, then inspect the full trace.
Your call · Value 3 is smaller than its parent 6. Why is the tree still invalid?