Example 1

Example 2

The number of nodes in the tree is in the range [0, 104].-104 <= Node.val <= 104All the values in the tree are unique.root is guaranteed to be a valid binary search tree.Example 1

Example 2

The number of nodes in the tree is in the range [0, 104].-104 <= Node.val <= 104All the values in the tree are unique.root is guaranteed to be a valid binary search tree.