Practice · 3 of 5
Rotate 90 degrees clockwise
CHALLENGE
Difficulty: advanced+25 XP
Return a **new** grid rotated 90° clockwise (the original must be untouched; the result may be non-square). Implement process(int[][] g).
Example: {{1,2,3},{4,5,6}} → {{4,1},{5,2},{6,3}}.
Press Submit to check your solution.
Back to lesson: Practice: Grid lab: axes, neighborhoods, walls