Wednesday, May 24, 2017

Leetcode 48: Image Rotate

May 24, 2017

Plan to work on image rotate.

The idea is to visit nodes in the matrix using the order of top row, right column, bottom row and then left column. So the rotate 90 degree clockwise is to shift the array to left.

C# practice is here.

The idea is to first reverse up to down, then swap the symmetry.

C# practice is here.


No comments:

Post a Comment