摘要:
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No... 阅读全文
posted @ 2015-06-18 15:16
朱传林
阅读(132)
评论(0)
推荐(0)
摘要:
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-06-18 09:08
朱传林
阅读(90)
评论(0)
推荐(0)
摘要:
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文
posted @ 2015-06-18 08:15
朱传林
阅读(142)
评论(0)
推荐(0)
摘要:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def... 阅读全文
posted @ 2015-06-18 08:12
朱传林
阅读(113)
评论(0)
推荐(0)
摘要:
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2015-06-18 08:11
朱传林
阅读(106)
评论(0)
推荐(0)