Back to DSA sheet

Rotate Image

MediumMatrix
Open on LeetCodeAmazonGoogleMetaMicrosoft

Rotate an n x n matrix 90 degrees clockwise in place.

Constraints
  • n == matrix.length == matrix[i].length
  • 1 <= n <= 20
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250Striver A2Z
rotate-image.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.