C# recursive solution with key ideas explanation.
There are 3 main ideas:\n1) Postorder traversal ends with the root node\n // by definition: starting from the root returns its value after both subtrees travers
There are 3 main ideas:\n1) Postorder traversal ends with the root node\n // by definition: starting from the root returns its value after both subtrees traversal\n2) Inorder traversal allows us to separate a given tree on two subtrees\n // by definition too: returns root value after left  and before right subtree traversals, so the root value is between subtrees\n3) Rolling back postorder traversal will give us root values in each subtree. So we can use a stack for it.\n\n```\n    public TreeNode BuildTree(int[] inorder, int[] postorder) {\n        var post = new Stack<int>(postorder);\n        var index = inorder.Select((val, index) => (val, index))\n                           .ToDictionary(x => x.val, x => x.index);\n        return Build(0, inorder.Length - 1);\n\n        TreeNode Build(int left, int right) {\n            if (left > right) return null;\n\n            var val = post.Pop();\n            var i = index[val];\n\n            return new TreeNode(val) {\n                right = Build(i + 1, right),\n                left = Build(left, i - 1)\n            };\n        }\n    }\n```
['Recursion']