Given an n x n 2D matrix representing an image, rotate the image in place by 90 degrees clockwise, without allocating another matrix.
matrix = [[1,2,3],[4,5,6],[7,8,9]][[7,4,1],[8,5,2],[9,6,3]]Solve it in the editor. Sign in free to run your Python or JavaScript against test cases, get a verdict, and track your attempts.
Solve on FeatCode →A grab-bag of problems solved with numeric or coordinate reasoning rather than a specific data structure — matrix manipulation, simulation, and basic number theory.
Read the full Math & Geometry guide →
Original problem on LeetCode ↗