DEV Community

Discussion on: Backspace String Comparisons: Two Ways To Approach a Common Algorithm

Collapse
 
andreasanta profile image
Andrea S.

I agree the idea of starting from the end simplifies things, but the if blocks should be broken into three groups. Sometimes I even use a while loop per string to skip all consecutive occurrences of #.