Problem 2546 · Medium
A 1 can never disappear, so the strings match exactly when they are equal or both contain a 1.
Open the interactive visualisation