2016年7月8日

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 @ 2016-07-08 11:46 胖胖的乓乓 阅读(134) 评论(0) 推荐(0) 编辑

Reverse Nodes in k-Group

摘要: 25. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of n... 阅读全文

posted @ 2016-07-08 10:44 胖胖的乓乓 阅读(125) 评论(0) 推荐(0) 编辑

Swap Nodes in Pairs

摘要: 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return ... 阅读全文

posted @ 2016-07-08 10:09 胖胖的乓乓 阅读(112) 评论(0) 推荐(0) 编辑

Merge k Sorted Lists

摘要: 23. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Subscrib... 阅读全文

posted @ 2016-07-08 09:36 胖胖的乓乓 阅读(119) 评论(0) 推荐(0) 编辑

导航