how can this solution be 0(1) complexity becuase we have to traverse the matrix while taking the transpose?
Please explain image rotation
@ivanshajkapoor Note that the Space Complexity of this solution is O(1) as you are solving it without using any extra space. The time complexity will not be O(1) as you have to traverse the whole matrix to find the transpose and then to find the mirror image. So time complexity will be O(n^2)
Right!
Thanks for answering pratyush