Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
del a[-1:] solution in Clear category for Backspace Apply by StefanPochmann
def backspace_apply(s: str) -> str:
a = []
for c in s:
if c == '#':
del a[-1:]
else:
a.append(c)
return ''.join(a)
Feb. 4, 2022
Comments: