Strings-remove duplicate

why some of the testcases didn’t pass?

hey @rishaseth123 you are only checking if two adjacent characters are equal or not but you have to check until you are found equal ,consider test case as “aaaaaaaaa” you will understand this,try using while loop if you again face problem please inform me.