Problems / Math & Geometry / Rotate Image
#136 Medium Time O(n²) Space O(1) Animated

Rotate Image

Rotate an n×n matrix 90 degrees clockwise in-place.

LeetCode ↗
Approach: Reverse & Transpose (In-place)
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps