摘要: class Solution {public: ListNode *reverseBetween(ListNode *head, int m, int n) { if (head == NULL || n 0) { pre = cur; ... 阅读全文
posted @ 2014-06-30 11:14 卖程序的小歪 阅读(158) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: vector > generate(int numRows) { vector > res; if (numRows row(1, 1); res.push_back(row); ... 阅读全文
posted @ 2014-06-30 10:29 卖程序的小歪 阅读(182) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: vector getRow(int rowIndex) { int half = (rowIndex + 1) / 2; int len = half * 2 + !(rowIndex & 0x1); ... 阅读全文
posted @ 2014-06-30 09:58 卖程序的小歪 阅读(173) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文
posted @ 2014-06-30 08:58 卖程序的小歪 阅读(155) 评论(0) 推荐(0) 编辑