Could not think of anymore corner cases . Can someone please help me out .
It will be of great help!
Thank you so much for the reference . Did it all already , still cannot get it right .
Cannot find the corner case .
This is the updated code.
Solved the bug , the could not handle when n=1 and m=1.
done same thing but shows WA . can you provide in which test case it is failing.
check for odd m case.