[Python 3] Stack - Simple
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: $$O(N)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(N)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def minSwaps(self, s: str) -> int:\n        cnt = 0\n        stack = []\n        for p in s:\n            if p == "[": stack.append("[")\n            else:\n                if not stack: \n                    stack.append("]")\n                    cnt += 1\n                else: \n                    stack.pop()\n        return cnt\n```
['Stack', 'Greedy', 'Python3']