String remove consecutive duplicate

it is showing TLE

your condition in the for loop at line 9 should be a[i] != '\n'

okat thankyou :slight_smile:

Please mark your doubt as resolved if you are satisfied

1 Like