C++ || O(N) SOLUTION || FULL EXPLANATION || RECURRSION
PLEASE DO UPVOTE IF YOU UNDERSTAND\n USING THE CONCEPT OF HEIGHT OF BINARY TREE :\n 1. Check for every node if abs(leftHeight - rightHeight) is > 1 \nIf yes tha
**PLEASE DO UPVOTE IF YOU UNDERSTAND**\n USING THE CONCEPT OF HEIGHT OF BINARY TREE :\n 1. Check for every node if abs(leftHeight - rightHeight) is > 1 \nIf yes than return -1.\n2. If after this leftHeight == -1 || rightHeight == -1 return -1;\n3. If the returned value is -1 then the answer will be false\nand if the returned value is height of the tree it will be true.\n\nclass Solution {\npublic:\n\n\n    bool isBalanced(TreeNode* root) {\n \n        return dfsHeight(root) != -1;\n    \n    }\n    \n    int dfsHeight(TreeNode* root){\n        \n        if(root == NULL) return 0;\n        \n        int leftHeight = dfsHeight(root->left);\n        if(leftHeight == -1) return -1;\n        int rightHeight = dfsHeight(root->right);\n        if(rightHeight == -1) return -1;\n        \n        if(abs(leftHeight - rightHeight) > 1) return -1;\n        \n        return max(leftHeight, rightHeight) + 1;\n        \n    }\n};\n **PLEASE DO UPVOTE IF YOU UNDERSTAND**\n\'\'\'
['Recursion', 'C', 'C++']