Simple, short and concise | C++
\nclass Solution {\npublic:\n    string removeOuterParentheses(string str) {\n        string ans = "";\n        stack<char> s;\n        \n        for(char c : s
```\nclass Solution {\npublic:\n    string removeOuterParentheses(string str) {\n        string ans = "";\n        stack<char> s;\n        \n        for(char c : str){\n            if(c == \'(\') s.push(c);\n            if(s.size() > 1) ans += c;\n            if(c == \')\') s.pop();\n        }\n        \n        return ans;\n    }\n};\n```
['Stack', 'C']