Example 1

Example 2

Example 3

The number of nodes in the tree is in the range [0, 104].-105 <= Node.val <= 105Each node has a unique value.root is a valid binary search tree.-105 <= key <= 105Example 1

Example 2

Example 3

The number of nodes in the tree is in the range [0, 104].-105 <= Node.val <= 105Each node has a unique value.root is a valid binary search tree.-105 <= key <= 105