摘要:
Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]You should return[1,2,3,6,9,8,7,4,5].相当于一圈一圈的剥掉矩阵,剥掉一圈,row-2, col-2 1 public class Solution { 2 public ArrayList spiralO... 阅读全文
posted @ 2014-02-11 14:05
Razer.Lu
阅读(164)
评论(0)
推荐(0)

浙公网安备 33010602011771号