Where goes wrong?

Provide case where my code going wrong?

hi @rishravi937
the initial o/p seem perfect but for large input 123456789
the result is truncated so probably there is same place of mismatch

u could check out this:
https://ide.codingblocks.com/s/219674
more efficient
probably ur result is not working for large i/p