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 #.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 #.