Simple recursive python 🐍 solution
\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.lef
```\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.left = left\n#         self.right = right\nclass Solution:\n    def buildTree(self, inorder: List[int], postorder: List[int]) -> TreeNode:\n        if not inorder:\n            return\n        \n        r=postorder.pop() \n        root=TreeNode(r) \n        i=inorder.index(r) \n        \n        root.right=self.buildTree(inorder[i+1:],postorder) \n        root.left=self.buildTree(inorder[:i],postorder) \n        return root\n\n        \n```
['Python', 'Python3']