摘要: 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], [1,4,6,4,1] ] 阅读全文
posted @ 2017-06-05 05:21 璨璨要好好学习 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 真的是太久太久没有刷题了。。。。那天阿里面到这么简单的题目发现自己都写不利索了。。。哭瞎。。。 Reverse a singly linked list. 可以用递归和非递归的方法。 递归: 主要思想是定义一个nextNode,用nextNode作为尾部直接连前面一个。 非递归: C++做法,虽然现 阅读全文
posted @ 2017-06-05 03:43 璨璨要好好学习 阅读(154) 评论(0) 推荐(0) 编辑