<filename>leet/strings/removeDuplicates.py<gh_stars>100-1000
class Solution:
    def removeDuplicates(self, s: str) -> str:
        stk = []
        
        for c in s:
            if stk and stk[-1] == c:
                stk.pop()
            else:
                stk.append(c)
        
        return "".join(stk)