Sharing my straightforward recursive solution
TreeNode *buildTree(vector<int> &inorder, vector<int> &postorder) {\n        return create(inorder, postorder, 0, inorder.size() - 1, 0, postorder.size() - 1);\
    TreeNode *buildTree(vector<int> &inorder, vector<int> &postorder) {\n        return create(inorder, postorder, 0, inorder.size() - 1, 0, postorder.size() - 1);\n    }\n    \n    TreeNode* create(vector<int> &inorder, vector<int> &postorder, int is, int ie, int ps, int pe){\n        if(ps > pe){\n            return nullptr;\n        }\n        TreeNode* node = new TreeNode(postorder[pe]);\n        int pos;\n        for(int i = is; i <= ie; i++){\n            if(inorder[i] == node->val){\n                pos = i;\n                break;\n            }\n        }\n        node->left = create(inorder, postorder, is, pos - 1, ps, ps + pos - is - 1);\n        node->right = create(inorder, postorder, pos + 1, ie, pe - ie + pos, pe - 1);\n        return node;\n    }\n\nActually, this problem is pretty similar as the previous one. \n\n[Here is a like to that solution. ][1]\n\n\n  [1]: https://oj.leetcode.com/discuss/18101/sharing-my-straightforward-recursive-solution
['C++']