[LintCode] 旋转图像 Rotate Image
给定一个N×N的二维矩阵表示图像,90度顺时针旋转图像。
样例
给出一个矩形[[1,2],[3,4]],90度顺时针旋转后,返回[[3,1],[4,2]]
挑战
能否在原地完成?You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Exampl
原创
2016-04-11 15:43:36 ·
1069 阅读 ·
0 评论