摘要: class Solution {public: ListNode *sortList(ListNode *head) { if (head == NULL || head->next == NULL) return head; ListNode *h1 = NULL... 阅读全文
posted @ 2014-04-17 21:06 卖程序的小歪 阅读(162) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (head == NULL || head->next == NULL) return head; Lis... 阅读全文
posted @ 2014-04-17 20:23 卖程序的小歪 阅读(116) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (head == NULL) return NULL; ListNode *pre, *cur, *tmp; ... 阅读全文
posted @ 2014-04-17 19:31 卖程序的小歪 阅读(127) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: ListNode *rotateRight(ListNode *head, int k) { if (head == NULL) return NULL; ListNode *p = head, *q = head; ... 阅读全文
posted @ 2014-04-17 16:55 卖程序的小歪 阅读(158) 评论(0) 推荐(0) 编辑