WRONG Output and Testcases


Check this input abbcccba 3 (it’s correct output should be aa because first remove ccc after that string become abbba and then remove bbb so final output should be aa) but interviewbit gives abbba .


Here you have to remove all consecutive characters of exactly B. First find all characters with this property and then delete all. we find only “ccc”. then removing it gives “abbba”.


Hey !
The characters are to be removed from the original string only. The same pattern of removing isn’t to be applied on the updated strings, I think.


because the problem statement given in interviewbit and leetcode are different…i hope it helps