Why my both testcases failed but in custom input gives right answer.
Spiral Print clockwise
@shardul15,
you have taken bottom twice. When dir==2, you need to take right instead of bottom. Hence the error
Why my both testcases failed but in custom input gives right answer.
@shardul15,
you have taken bottom twice. When dir==2, you need to take right instead of bottom. Hence the error