in this we have to remove all the adjancent duplicate
2
geeksforgeek
acaaabbbacdddd
Output:
gksforgk
acac
please check my code some of the test cases get failed
in this we have to remove all the adjancent duplicate
2
geeksforgeek
acaaabbbacdddd
Output:
gksforgk
acac
please check my code some of the test cases get failed
hi @rohitkandpal683 see you are processing the string only once, but this question expects that you will keep removing duplicates till all duplicates are removed.
for eg in the example
mississipie
it becomes after removing duplicates
miiipie
but the resultant string has some duplicates too
so you have to call the function to remove duplicates on this string again
now the string will becomes
mpie
now there are no more duplicates left, so this can be your final answer
https://ide.codingblocks.com/s/289223 i tried to solve this in different approach here but my answer has some mistake please check
https://ide.codingblocks.com/s/289223 in this submission Input: mississipie Its Correct output is: mpie And Your Code’s output is: mipie how can i correct it