摘要: 问题描述Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix:[ ... 阅读全文
posted @ 2015-07-24 09:59 Chapter 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [... 阅读全文
posted @ 2015-07-24 09:10 Chapter 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit i... 阅读全文
posted @ 2015-07-24 08:52 Chapter 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 问题描述Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't... 阅读全文
posted @ 2015-07-24 08:33 Chapter 阅读(126) 评论(0) 推荐(0) 编辑