摘要:
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:快慢指针的应用。快慢指针指的是移动的步长,即每次向前移动的快慢。例如可以让快指... 阅读全文
摘要:
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 ... 阅读全文