PATHLIGHT
LESSON 04 OF 08Validate a BST
0% learnt
VALIDATE BINARY SEARCH TREE · RECURSIVE BOUNDS

What valid range does root 8 receive?

The root has no ancestors, so no finite lower or upper bound exists yet.

RULE TO APPLYLeft child inherits (min, parent); right child inherits (parent, max).
LIVE ALGORITHM STATE8 is valid, so its value becomes a boundary for both children.
8(-∞, +∞)310614
ALLOWED RANGE
−∞< 8 <+∞