Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
re.subn solution in Clear category for Backspace Apply by StefanPochmann
import re
def backspace_apply(s: str) -> str:
while True:
s, n = re.subn('.?#', '', s, 1)
if not n:
return s
Dec. 13, 2021