WRONG Output and Testcases


#1

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 .
WHY???


#2

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”.


#3

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.


#4

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