Java Simple Solution || Recursive Approach
\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n
```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n *     TreeNode(int val) { this.val = val; }\n *     TreeNode(int val, TreeNode left, TreeNode right) {\n *         this.val = val;\n *         this.left = left;\n *         this.right = right;\n *     }\n * }\n */\nclass Solution {\n    public TreeNode buildTree(int[] inorder, int[] postorder) {\n        int n = postorder.length;\n        return rBuildTree(postorder,0,n-1,inorder,0,n-1);\n    }\n    \n    // psi -> Postorder starting index\n    // pei -> Postorder ending index\n    // isi -> Inorder starting index\n    // iei -> Inorder ending index\n    // colse -> Count of Left Sub Tree elements\n    private TreeNode rBuildTree(int[] postorder, int psi, int pei, int[] inorder, int isi, int iei) {\n        if(isi>iei)\n            return null;\n        int idx = isi;\n        while(inorder[idx]!=postorder[pei])\n            idx++;\n        \n        int colse = idx-isi;\n        TreeNode node = new TreeNode(postorder[pei]);\n        \n        node.left = rBuildTree(postorder,psi,psi+colse-1,inorder,isi,idx-1); // left subtree call\n        node.right = rBuildTree(postorder,psi+colse,pei-1,inorder,idx+1,iei); // right subtree call\n        \n        return node;\n    }\n}\n```
['Recursion', 'Java']