Question: Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder is the postorder traversal of the
Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder is the postorder traversal of the same tree, construct and return the binary tree.
Example 1:

inorder = [9,3,15,20,7], postorder = [9,15,7,20,3]Output: [3,9,20,null,null,15,7]
Example 2:
Input:inorder = [-1], postorder = [-1]Output: [-1]
Constraints:
- 1
9 3 15 20 7
Step by Step Solution
3.57 Rating (154 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below class Solution public ... View full answer
Get step-by-step solutions from verified subject matter experts
