Python || Easy || Recursive || 54ms || Faster than 93%
\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    balanced = True\n\n    def isBalanced(self, root: Optional[TreeNode]) -> bool:\n        if root == None: return True\n        self.height(root)\n        return self.balanced\n    \n    def height(self, root):\n        if (root == None): return 0\n        l = self.height(root.left)\n        r = self.height(root.right)\n        if (abs(l-r) > 1):\n            self.balanced = False\n        return max(l, r)+1\n```
['Python']