Sir some only 1 testcase is passing here is my code link
@Harshit-Kumar-2577121455897279
you are not removing all consecutive duplicates, you are just removing adjacent duplicates.
Consider this testcase
“aaaab”
ans should be “ab” but your code is giving “aab”
please check your logic
thank you sir i got the mistake
@Harshit-Kumar-2577121455897279
Please mark your doubt as resolved. If you have no more doubt regarding this question.