getting garbage values as output
π‘ Arrays-Spiral Print Anticlockwise
@p45s99tik hey pratik there is a silly mistake in your code check you cin statement you are doing arr[R][C] instead you should do arr[i][j]
getting wrong answer on 2nd and 3rd test case
@p45s99tik hey Pratik, I think youβre doing in the wrong way I am sharing the edited code your code.
@p45s99tik can you please tell me what problem are you facing and why you sent me this line of code.
wrong answer on 3rd test case for above code
not really, just handling edge cases outside of for loop
yes i want to know why code is giving WA on third test case
@p45s99tik hey pratik consider this case
3 4
1 2 3 4
1 2 3 4
1 2 3 4
your output
1, 1, 1, 2, 3, 4, 4, 4, 3, 2, 3, 0, END
but it should be
1, 1, 1, 2, 3, 4, 4, 4, 3, 2, 2, 3, END
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.
how to pass third test case