Smart keypad - I Problem

https://ide.codingblocks.com/#/s/16315

this is my code working for one of the test case… But wrong ans for the another…
https://hack.codingblocks.com/contests/c/452/96

above is the question link.

nitesh for 1 dont take that case seperately in 01 u having a charadter twice printed

yeah. I tried solving it. Can help me with the code !!

didn’t u get the right sol
if not then i will modify ur code and then post it

No. I didn’t get …how to correct my code !!

https://ide.codingblocks.com/#/s/16757
check this code…

what is k here ??
please also explain this line of code
print(in ,out, i+1, j+1);