摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you 阅读全文
posted @ 2018-10-10 14:26 Pickle 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 经典问题,判断一个单向链表是否有环,快慢指针,有相遇即有环。 阅读全文
posted @ 2018-10-10 14:21 Pickle 阅读(164) 评论(0) 推荐(0) 编辑