Backspace string compare
Typing is a stack: each letter goes on top, and a backspace removes the last one typed. Push the letters, pop on #, and whatever is left in each stack is the text on screen.
stack holds the letters typed so far; the index under each is where it came from.