Untitled
unknown
plain_text
10 months ago
178 B
33
Indexable
def solve(self, A):
stack=[]
for ch in A:
if stack and ch==stack[-1]:
stack.pop()
else:
stack.append(ch)
return "".join(stack)Editor is loading...
Leave a Comment