fastest solution in python using stack | easy
\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n        s= list(s)\n        stack= []\n        \n        \n        for i in range(len(s))
```\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n        s= list(s)\n        stack= []\n        \n        \n        for i in range(len(s)):\n            \n            if s[i]==\'(\':\n                stack.append(i)\n            elif s[i]==\')\':\n                \n                if stack:\n                    stack.pop()\n                else:\n                    s[i]=\'\'\n                    \n        for i in stack:\n            s[i]=\'\'\n            \n        return \'\'.join(s)\n```
['Python', 'Python3']