
LeetCode
平凡的兵
AI的实践者
展开
-
spiralMatrix
/** * Note: The returned array must be malloced, assume caller calls free(). */ int* spiralOrder(int** matrix, int matrixRowSize, int matrixColSize) { int* vector = malloc( sizeof(int) * matrixR原创 2016-07-17 11:42:59 · 468 阅读 · 0 评论 -
spiralMatrixII
/** * Return an array of arrays. * Note: The returned array must be malloced, assume caller calls free(). */ int** generateMatrix(int n) { int x0 = 0; // top left x int y0 = 0; // to原创 2016-07-17 18:16:45 · 444 阅读 · 0 评论