Example 1

Example 2

Example 3

The number of nodes in the tree is in the range [1, 214].0 <= Node.val <= 105root is a perfect binary tree.Example 1

Example 2

Example 3

The number of nodes in the tree is in the range [1, 214].0 <= Node.val <= 105root is a perfect binary tree.