ROTATE IMAGE problem

I’D DONE THIS QUESTION FOR nXn matrix, but if the matrix is not nXn, then how to do this without taking any extra space?

@CODER_JATIN you can print the answer without extra space in that case,
but to store the answer or return it, you need extra space because if earlier the matrix was mxn then later it becomes nxm.(and you can’t store a nxm array in array of size mxn)

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.