My code is not able to pass all the test cases. Why?
Remove Duplicates
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. 
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. 