摘要: Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ]]class Solution {public: vector > generateMatrix(int n) { // Start typing your C/C++ solution below... 阅读全文
posted @ 2013-09-03 23:12 一只会思考的猪 阅读(163) 评论(0) 推荐(0) 编辑