Spiral Print clockwise

This is my code here

it hasn’t passed test case 0 but it has passed test case 1 can anyone tell me what i am doing wrong here

at line no 33
if(sr<er){ // Incorrect
it should be
if(sr<=er){

also at line no 44
if(sc<ec){ // Incorrect
it should be
if(sc<=ec){

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.