Array
48. Rotate Image
A 90° clockwise rotation factors into two in-place moves you already know: transpose (mirror across the main diagonal), then reverse each row. Transposing swaps [i][j] with [j][i]; reversing the rows…
Loading…
A 90° clockwise rotation factors into two in-place moves you already know: transpose (mirror across the main diagonal), then reverse each row. Transposing swaps [i][j] with [j][i]; reversing the rows…
Loading…