Rotate 90 Degrees — Solution & Editorial
Rotated[j][i'] comes from g[N−1−i'][j]: the first column (bottom to top) becomes the first row.
Complexity: O(NM)
Rotated[j][i'] comes from g[N−1−i'][j]: the first column (bottom to top) becomes the first row.
Complexity: O(NM)