Python Easy understanding
2 arrays to store the 1) index of ( and 2) charactors of str\n```\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n\t\tstack = []\n        
2 arrays to store the 1) index of `(` and 2) charactors of `str`\n```\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n\t\tstack = []\n        res = []\n        for i,v in enumerate(s):\n            res.append(v)  # save the charactors to final resutls\n            if v == \'(\':\n                stack.append(i) # always save left \'(\' index, to decided if this need to remove or not \n            if v == \')\':\n                if stack:\n                    stack.pop() # as stack saved left \'(\', so here is good to pop one no matter the index value, just pop the left as a pair\n                else:\n                    res[-1] = \'\'  # as stack is empty, now we see additional right \')\', need replace res[-1] with a empty str, \n\t\t\t\t\t                    # why not pop out? \n\t\t\t\t\t\t\t\t\t\t# if we do pop, once we loop to the end of the string\n\t\t\t\t\t\t\t\t\t\t# if we still have some  left \'(\' in stack, \n\t\t\t\t\t\t\t\t\t\t# while we do replace array value, it may mess up. \n\t\t\t\t\t\t\t\t\t\t# here, we need keep our res index consistent with the original str \'s\'.\n\t\t\n\t\t# if we have some left \'(\' index stack, which means not paired ones, let\'s remove these ones\n        while stack:\n            res[stack.pop()] = \'\'\n\t\t\n        return "".join(res)\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
['Stack', 'Python']