Given arrays
inorder and postorder — tree traversals. Reconstruct the binary tree and return its root.Example 1
Input: inorder = [-1], postorder = [-1]
Output: [-1]
Explanation: A tree with one node.
Output: [-1]
Explanation: A tree with one node.
Example 2
Input: inorder = [9,3,15,20,7], postorder = [9,15,7,20,3]
Output: [3,9,20,null,null,15,7]
Explanation: The root is the last element of postorder.
Output: [3,9,20,null,null,15,7]
Explanation: The root is the last element of postorder.