In & Post + Pre & In + Pre & Post.
Inorder + Postorder\n\nTreeNode* helper(int inSt, int inEnd, int poEnd, vector<int> &inorder, vector<int> &postorder) {\n    if(poEnd < 0 || inSt > inEnd) retur
Inorder + Postorder\n```\nTreeNode* helper(int inSt, int inEnd, int poEnd, vector<int> &inorder, vector<int> &postorder) {\n    if(poEnd < 0 || inSt > inEnd) return nullptr; // base condition\n\n    TreeNode *root = new TreeNode(postorder[poEnd]);\n\n    int pivot;\n    for(int i = inSt; i < inorder.size(); i++) {\n        if(root->val == inorder[i]) {\n            pivot = i; break;\n        }\n    }\n\n    root->left = helper(inSt, pivot - 1, poEnd - 1 + pivot - inEnd, inorder, postorder);\n    root->right = helper(pivot + 1, inEnd, poEnd - 1, inorder, postorder);\n\n    return root;\n}    \n\nTreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) {\n    return helper(0, inorder.size() - 1, postorder.size() - 1, inorder, postorder);\n}\n```\n\nPreorder + Inorder\n```\nTreeNode* helper(int preSt, int inSt, int inEnd, vector<int>& preorder, vector<int>& inorder) {\n    if(inSt > inEnd || preSt >= preorder.size()) return nullptr;\n\n    TreeNode* root = new TreeNode(preorder[preSt]);\n\n    int pivot;\n    for(int i = 0; i < inorder.size(); i++) {\n        if(inorder[i] == root->val) {\n            pivot = i; break;\n        }\n    }\n\n    root->left = helper(preSt + 1, inSt, pivot - 1, preorder, inorder);\n    root->right = helper(preSt + pivot - inSt + 1, pivot + 1, inEnd, preorder, inorder);\n\n    return root;\n}\n\nTreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) {\n    return helper(0, 0, inorder.size() - 1, preorder, inorder);\n}\n```\n\nPreorder + Postorder (Can only be done for full trees i.e. 0 or 2 children for every node)\n```\nTreeNode* helper(vector<int> &pre, int preSt, int preEnd, vector<int> &post, int postSt, int postEnd) {\n    if(preSt == preEnd) return new TreeNode(pre[preSt]);\n    if(preSt > preEnd) return nullptr;\n\n    TreeNode *root = new TreeNode(pre[preSt]);\n\n    int pivot;\n    for(pivot = postSt; pivot <= postEnd;  pivot++) {\n        if(pre[preSt + 1] == post[pivot]) {\n            pivot = pivot + 1 - postSt; break;\n        }\n    }\n\n    root->left = helper(pre, preSt + 1, preSt + pivot, post, postSt, postSt + pivot - 1);\n    root->right = helper(pre, preSt + pivot + 1, preEnd, post, postSt + pivot, postEnd - 1);\n\n    return root;\n}\n\nTreeNode* constructFromPrePost(vector<int>& pre, vector<int>& post) {\n    return helper(pre, 0, pre.size() - 1, post, 0, post.size() - 1);\n}\n```
['C']