Determine whether a binary tree is a valid binary search tree: every node's left subtree contains only smaller values, its right subtree only larger values, and both subtrees are BSTs.
Input: one line — the tree in level order.
Output: true or false.
2 1 3
true
5 1 4 null null 3 6
false
3 sits in the right subtree of 5.
Run your code against the sample tests, or Submit to run the full suite.