Loading problem…
Given the root of a binary tree, determine if it is a valid binary search tree (BST).
root
A valid BST is defined as follows:
// Tree: [2,1,3] → true (valid BST) // Tree: [5,1,4,null,null,3,6] → false (Node 3 in right subtree is less than root 5)
2 hints available with Pro