Your question is Palindrome and Backspace String Compare. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Akamai Control Center may represent user-edited filter text before it is submitted. In these strings, # acts as a backspace that removes the most recent valid character to its left. Compare two strings and determine whether they produce the same final text.
Implement backspace_compare(s, t), where s and t are strings containing lowercase English letters and #. Return True if both strings are equal after applying all backspaces, otherwise return False.
A backspace with no available character has no effect. The solution should avoid constructing the fully edited strings when possible.
def backspace_compare(s, t):