This is a pretty famous question where you need to rotate the matrix 90 degrees counter clockwise around the center element. What i don't understand is the smart solution to this problem, which first takes the transpose of the matrix first and then reverse the elements in each column. Can anybody provide the intuition behind this, or prove why this works.
Link: https://www.geeksforgeeks.org/rotate-matrix-90-degree-without-using-extra-space-set-2/