Backspace String Compare
easyCompare two strings with backspace characters (#)
Backspace String Compare
Key Insight
Process from end: count # as skips, find next valid char in each string, compare them.
Step 1Setup
t="ad#c"
a
0b
1#
2i
j
c
3→→same direction
s="ab#c", t="ad#c". Process from end using skip counters.
1 / 5