leetcode 48. Rotate Image-矩陣旋轉

原題連接:48. Rotate Image 【思路-Java】java  矩陣的順時針90°旋轉,關鍵是找到座標關係。本題中 n 的值提早減1了,因此在下面的運算中就沒有減1了。spa public class Solution { public void rotate(int[][] matrix) { for(int i=0, temp=0, n=matrix.leng
相關文章
相關標籤/搜索