摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Subscribeto see which companies asked this... 阅读全文
posted @ 2015-11-17 20:01 AprilCheny 阅读(889) 评论(0) 推荐(0) 编辑
摘要: Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.Subsc... 阅读全文
posted @ 2015-11-17 18:25 AprilCheny 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 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-11-17 11:00 AprilCheny 阅读(726) 评论(0) 推荐(0) 编辑