Move all x error

https://ide.codingblocks.com/s/46382

Heyy Karan , your code has many bugs like your code will go into infinite loop if your input contains only ‘x’(example = xxxxx) and even for the following strings your code will give wrong answers .
abcxhxigxxz
I have modified ur code here , take a look on it

1 Like