Example 1

Example 2

Example 3

The number of nodes in the tree will be in the range [0, 104].-108 <= Node.val <= 108All the values Node.val are unique.-108 <= val <= 108It's guaranteed that val does not exist in the original BST.Example 1

Example 2

Example 3

The number of nodes in the tree will be in the range [0, 104].-108 <= Node.val <= 108All the values Node.val are unique.-108 <= val <= 108It's guaranteed that val does not exist in the original BST.