Remove Duplicates


My code is not able to pass all the test cases. Why?

Consider a input:
aaaaaaaaaaa

Your o/p:
aaaaa

Dry run with this and recheck your logic.

Got it. Thank you. I actually corrected the code myself. :slight_smile: