✅ C++ solution | Easy with explanation
\n# Code\n\n\nclass Solution {\npublic:\n    int checkBalanse(TreeNode* root, bool& res) {\n        // if root = null or result already false\n        if (!root
\n# Code\n```\n\nclass Solution {\npublic:\n    int checkBalanse(TreeNode* root, bool& res) {\n        // if root = null or result already false\n        if (!root || !res) return 0;\n\n        // find height for left and right nodes\n        int left_height = checkBalanse(root->left, res);\n        int right_height = checkBalanse(root->right, res);\n        if (abs(left_height - right_height) > 1)\n            res = false;\n        \n        return max(left_height, right_height) + 1;\n    }\n    bool isBalanced(TreeNode* root) {\n        bool res = true;\n        checkBalanse(root, res);\n\n        return res;\n    }\n};\n\n```
['C++']