C++ Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n    Two Pointer\n\n# Co
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n    Two Pointer\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(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int minSwaps(string s) {\n        int open = 0, close = 0;\n        for(auto c : s) {\n            if(c == \']\') {\n                if(open) open--;\n                else close++;\n            } \n            else open++;\n        }\n        int ans = (open + 1) / 2;\n        return ans;\n    }\n};\n```
['C++']