2015年10月16日

Rotate List

摘要: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne... 阅读全文

posted @ 2015-10-16 20:15 RenewDo 阅读(136) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted List

摘要: 1 class Solution { 2 public: 3 ListNode* deleteDuplicates(ListNode* head) { 4 ListNode prehead(0); 5 prehead.next=head; 6 ... 阅读全文

posted @ 2015-10-16 19:28 RenewDo 阅读(130) 评论(0) 推荐(0) 编辑

Reverse Linked List II

摘要: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne... 阅读全文

posted @ 2015-10-16 19:18 RenewDo 阅读(122) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted List II

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文

posted @ 2015-10-16 18:42 RenewDo 阅读(123) 评论(0) 推荐(0) 编辑

Partition List

摘要: 1 class Solution { 2 public: 3 ListNode* partition(ListNode* head, int x) { 4 // ListNode *node1,* node2; 5 ListNode *node1,*node2; 6 ... 阅读全文

posted @ 2015-10-16 14:21 RenewDo 阅读(190) 评论(0) 推荐(0) 编辑

导航