Can you see whats wrong with my code?

hello @akash_281
image
here it should be m-1

I did what you asked, its still not passing all the test cases

everywhere u r using n for column but actually it should be m.
ur updated code->https://ide.codingblocks.com/s/285864