{{ Swift }} O(N) Speed O(N) Space Recursive Solution - Slick Moves, Rick
\nclass Solution {\n    \n    func isBalanced(_ root: TreeNode?) -> Bool {\n        var md: Int = 0\n        return isBalanced(root, &md)\n    }\n    \n    func
```\nclass Solution {\n    \n    func isBalanced(_ root: TreeNode?) -> Bool {\n        var md: Int = 0\n        return isBalanced(root, &md)\n    }\n    \n    func isBalanced(_ root: TreeNode?, _ max_depth: inout Int) -> Bool {\n        \n        guard var root = root else { return true }\n        \n        var depth_left: Int = max_depth + 1\n        if isBalanced(root.left, &depth_left) == false { return false }\n        \n        var depth_right: Int = max_depth + 1\n        if isBalanced(root.right, &depth_right) == false { return false }\n        \n        max_depth = max(depth_left, depth_right) \n        \n        if abs(depth_left - depth_right) > 1 { return false }\n        \n        return true\n    }\n}\n```\n\nCode so tight it makes toddlers wanna fight over yo yo\'s and go-pros.
[]