摘要:
分析 难度 中 来源 https://leetcode.com/problems/linked-list-cycle-ii 环之前节点数 a;从环起始节点到快慢指针相遇位置,节点数 b 快慢指针fast slow相遇,慢指针走过 a+b,快指针走过2*(a+b) 快慢指针相遇时,创建第二个慢指针 s 阅读全文
摘要:
分析 难度 中 来源 https://leetcode.com/problems/linked-list-cycle-ii 环之前节点数 a;从环起始节点到快慢指针相遇位置,节点数 b 快慢指针fast slow相遇,慢指针走过 a+b,快指针走过2*(a+b) 快慢指针相遇时,创建第二个慢指针 s 阅读全文
摘要:
分析 难度 易 来源 https://leetcode.com/problems/linked-list-cycle/ 题目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it wit 阅读全文
|