Easy and Simple Approach ✅ || Beats 100% 🎯
\n# Code\n\nclass Solution {\npublic:\n    string removeOuterParentheses(string s) {\n        string ans;\n        int cnt = 0;\n        for (char chr : s)\n   
![image.png](https://assets.leetcode.com/users/images/0669a34b-4fbf-451f-a8ba-069539c39539_1716463256.564444.png)\n# Code\n```\nclass Solution {\npublic:\n    string removeOuterParentheses(string s) {\n        string ans;\n        int cnt = 0;\n        for (char chr : s)\n            if (chr == \'(\')\n                if (!cnt)\n                    cnt++;\n                else {\n                    ans += \'(\';\n                    cnt++;\n                }\n            else if (cnt > 1) {\n                ans += \')\';\n                cnt--;\n            } else\n                cnt--;\n        return ans;\n    }\n};\n```
['String', 'Stack', 'C++']