Easy Python dfs solution👻
\n    def isBalanced(self, root: TreeNode) -> bool:\n        if not root:\n            return True\n        \n        self.answer = True\n        \n        def 
```\n    def isBalanced(self, root: TreeNode) -> bool:\n        if not root:\n            return True\n        \n        self.answer = True\n        \n        def dfs(root):\n            l, r = 0, 0\n\n            if root.left:\n                l += dfs(root.left)\n            if root.right:\n                r += dfs(root.right)\n            if abs(r-l) > 1:\n                self.answer = False\n                \n            # print(root.val, r, l)\n            return max(r,l) + 1\n        dfs(root)\n        return self.answer\n        \n```
['Depth-First Search', 'Recursion', 'Python', 'Python3']