East to understand in C++ || Stack
class Solution {\npublic:\n\n\n    int minSwaps(string s) {\n        stack st;\n        for(int i=0;i<s.length();i++){\n            if(s[i]==\'[\'){\n          
class Solution {\npublic:\n\n\n    int minSwaps(string s) {\n        stack<char> st;\n        for(int i=0;i<s.length();i++){\n            if(s[i]==\'[\'){\n                st.push(s[i]);\n            }\n            else if(!st.empty()){\n                st.pop();\n            }\n        }\n        return (st.size()+1)/2;\n    }\n};
[]