python 83%, 100% solution
\nclass Solution:\n\n    def is_leaf(self, root: TreeNode) -> bool:\n        return not root.left and not root.right\n\n    def isBalanced(self, root: TreeNode)
```\nclass Solution:\n\n    def is_leaf(self, root: TreeNode) -> bool:\n        return not root.left and not root.right\n\n    def isBalanced(self, root: TreeNode) -> bool:\n        if not root:\n            return True\n\n        if self.is_leaf(root):\n            root.height = 1\n            return True\n        elif not root.left and root.right:\n            if self.is_leaf(root.right):\n                root.height = 2\n                return True\n            return False\n        elif root.left and not root.right:\n            if self.is_leaf(root.left):\n                root.height = 2\n                return True\n            return False\n        elif self.isBalanced(root.left) and self.isBalanced(root.right):\n            if abs(root.left.height - root.right.height) <= 1:\n                root.height = max(root.left.height, root.right.height) + 1\n                return True\n            return False\n        return False\n```
['Python', 'Python3']