Example 1

Example 2

The number of nodes in the tree is in the range [0, 105].-1000 <= Node.val <= 1000Example 1

Example 2

The number of nodes in the tree is in the range [0, 105].-1000 <= Node.val <= 1000