Example 1

Example 2

The number of nodes in the tree will be in the range [0, 104].-231 <= Node.val <= 231 - 1Example 1

Example 2

The number of nodes in the tree will be in the range [0, 104].-231 <= Node.val <= 231 - 1