Loading...
Given the root of a binary tree (as a level-order array), determine if it is a valid binary search tree (BST).
A valid BST has:
2,1,3
True
2,1,3 represents a binary tree with root node 2, left child 1, and right child 3.1 is less than 2, it satisfies the BST condition.3 is greater than 2, it satisfies the BST condition.True.