Code looks fine but not passing all test cases

Where am I going wrong?

Code Link : https://ide.codingblocks.com/s/213247

you did a simple mistake…here
if(sCol < eCol){
for(int i=eRow;i>=sRow;i–){…
…
the condition should be sCol<=eCol, as eCol is inclusive in your case.
updated code: https://ide.codingblocks.com/s/214394

please rate and resolve if satisfied.
thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.