Skip to content

Latest commit

 

History

History
 
 

rotateImage

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Problem

You are given an n x n 2D matrix representing an image.

Rotate the image by 90 degrees (clockwise).

Follow up: Could you do this in-place?

Solution

Use a graph to figure out the cooridinates of each point