Given the root of a binary tree
root. Determine whether it is a valid binary search tree (BST): for every node, all values in the left subtree are strictly less than the node's value, and all values in the right subtree are strictly greater.Example 1
Input: root = [5,1,4,null,null,3,6]
Output: false
Explanation: Node 4 is in the right subtree of root 5, but is less than 5.
Output: false
Explanation: Node 4 is in the right subtree of root 5, but is less than 5.
Example 2
Input: root = [2,1,3]
Output: true
Explanation: Valid BST: left < root < right.
Output: true
Explanation: Valid BST: left < root < right.