Given the root of a binary tree, determine whether it 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 themselves valid BSTs (no duplicate values). Return true or false. The tree is given as a level-order array.
Input: A level-order array of the tree.
Output: Boolean — true or false.
Input: [2,1,3]
Output: true
Explanation: Valid BST ordering.Input: [5,1,4,null,null,3,6]
Output: false
Explanation: 4 in the right subtree is less than 5.Input: [1]
Output: true
Explanation: Single node.0<=nodes<=10^4-2^31<=value<=2^31-1