The naive approach: check that left child < root < right child. But this is wrong. The entire left subtree must be less than the root, not just the immediate child. The trick: pass down valid ranges. For the left subtree, all values must be less than the current node. For the right subtree, all values must be greater. Each recursive call has a valid range [min, max] that values must fall within.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/trees-bst/validate-binary-search-tree-hint
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████████████████████████████████████████████████████████████████████████████████████████