Rotate Image
Rotate a square matrix 90° clockwise in place by transposing it and then reversing each row.
01The problem
Rotate an n × n matrix 90° clockwise, in place (don't create another matrix).
text
1 2 3 7 4 1
4 5 6 → 8 5 2
7 8 9 9 6 3Loading the rest of the lesson…