Anticlockwise spiral print

when i use the
if(sr<er)
{
print start row
}
if(sc<ec)
{
print end column
}

only 3 test case is pass
but when is
if(sr<=er)
all testcase pass

could u share ur code so that i could explain u better.

YEs, <= should be used since it covers all the conditionsss

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.