✅Java Simple Solution || ✅Runtime 2ms || ✅ Beats100%
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\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String removeOuterParentheses(String s) {\n        int count = 0;\n        StringBuilder result = new StringBuilder();\n\n        for (char c : s.toCharArray()) {\n            if (c == \'(\') {\n                if (count != 0) {\n                    result.append(c);\n                }\n                count++;\n            } else {\n                if (count != 1) {\n                    result.append(c);\n                }\n                count--;\n            }\n        }\n\n        return result.toString();\n    }\n}\n\n```\n\n## For additional problem-solving solutions, you can explore my repository on GitHub: [GitHub Repository](https://github.com/ahmedna126/java_leetcode_challenges)\n\n\n![e78315ef-8a9d-492b-9908-e3917f23eb31_1674946036.087042.jpeg](https://assets.leetcode.com/users/images/81901a24-f5a0-4fb4-a020-a3cda419a018_1693337713.2181766.jpeg)\n
['Java']