Image rotation problem

can i use atleast one loop ???
and what exactly O(1) means ;
as far as i know it means in constant time means
i cant use any loop right? so,how i am going to find the transpose without a loop?

can i take an extra matrix???

Hey @sharmalakshyarocks,

You have misunderstood the problem.
You are not required to solve it in O(1) time complexity.
However, the constraint is on the extra space i.e. O(1) space complexity.

So, No you cannot take any extra matrix.
You have to make changes in the same matrix as it has been explained in the question.

Hope, this would help.
Give a like, if you are satisfied.