A Python recursive solution
# Definition for a  binary tree node\n    # class TreeNode:\n    #     def __init__(self, x):\n    #         self.val = x\n    #         self.left = None\n    #
    # Definition for a  binary tree node\n    # class TreeNode:\n    #     def __init__(self, x):\n    #         self.val = x\n    #         self.left = None\n    #         self.right = None\n    \n    class Solution:\n        # @param inorder, a list of integers\n        # @param postorder, a list of integers\n        # @return a tree node\n        # 12:00\n        def buildTree(self, inorder, postorder):\n            if not inorder or not postorder:\n                return None\n            \n            root = TreeNode(postorder.pop())\n            inorderIndex = inorder.index(root.val)\n    \n            root.right = self.buildTree(inorder[inorderIndex+1:], postorder)\n            root.left = self.buildTree(inorder[:inorderIndex], postorder)\n    \n            return root
['Python']