C++|faster code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n\n# Code\n```\nclass Solution {\npublic:\n    string removeOuterParentheses(string s) {\n        string res="";\n        stack<char> st;\n        int i=0;\n        while(i<s.size()){\n            char ch = s[i];\n            if(ch ==\'(\'){\n                if(st.size()>0)\n                res += ch;\n                st.push(ch);\n            }\n            else{\n                if(st.size()>1){\n                    res +=\')\';\n                }\n                st.pop();\n            }\n          \n\n            i++;\n        }\n        return res;\n    }\n};\n```
['String', 'Stack', 'C++']