Simple Python Recursive Solution
Recursive Solution \n First define a getDepth dfs helper to quickly get the level of depth of the node.\n Then to check if the following three conditions are al
### Recursive Solution \n* First define a getDepth dfs helper to quickly get the level of depth of the node.\n* Then to check if the following three conditions are all satisfied:\n\t* check if the root itself is height-balanced (by checking if the absolute difference of the levels of depth between root\'s left child and right child is less than 1)\n\t* check if the root\'s left child is height-balanced (by recursion)\n\t* check if the root\'s right child is height-balanced (by recursion)\n\n\n\n```\nclass Solution:\n    def isBalanced(self, root: TreeNode) -> bool:\n        def getDepth(node):\n            if not node:\n                return 0\n            return 1 + max(getDepth(node.left), getDepth(node.right))\n        \n        if not root:\n            return True\n        return abs(getDepth(root.left) - getDepth(root.right)) < =1 and \\\n                self.isBalanced(root.left) and self.isBalanced(root.right)\n```
['Depth-First Search', 'Recursion', 'Python', 'Python3']