simple and easy C++ solution
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n\n\n# Code\ncpp []\nclass Solution 
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minSwaps(string s) \n    {\n        stack<char>st;\n        int count = 0 ;\n        for(char c:s)\n        {\n            if(c==\'[\') st.push(c);\n            else\n            {\n                if(st.empty()) count++;\n                else st.pop();\n            }\n        }\n        int ans = count/2;\n        if(count%2) ans++;\n        return ans;\n    }\n};\n```
['Two Pointers', 'String', 'Stack', 'Greedy', 'C++']