Validate Binary Search Tree (LC #98) checks if a tree satisfies BST properties. Each node must be within a valid range. Start with range . For left child, update upper bound to parent value. For right child, update lower bound. If any node violates its range, return false. This runs in time and space. Alternative: in-order traversal should produce sorted values. Track previous value and ensure current is strictly greater. Meta asks about handling duplicates.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/trees/validate-binary-search-tree
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████████████