code-链表
chunxia75qin
这个作者很懒,什么都没留下…
展开
-
Reverse Linked List II
题目: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy th原创 2013-05-30 12:58:47 · 525 阅读 · 0 评论 -
Partition List
题目: Given a linked list and a value x, partition it such that all nodes less thanx come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in ea原创 2013-05-28 10:56:32 · 647 阅读 · 0 评论