摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:快慢指针的应用。快慢指针指的是移动的步长,即每次向前移动的快慢。例如可以让快指... 阅读全文
posted @ 2014-11-03 20:29 vincently 阅读(145) 评论(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 @ 2014-11-03 19:36 vincently 阅读(126) 评论(0) 推荐(0) 编辑