flowingfog

偶尔刷题

  博客园  :: 首页  :: 新随笔  :: 联系 ::  :: 管理

2018年11月7日

摘要: 分析 难度 中 来源 https://leetcode.com/problems/linked-list-cycle-ii 环之前节点数 a;从环起始节点到快慢指针相遇位置,节点数 b 快慢指针fast slow相遇,慢指针走过 a+b,快指针走过2*(a+b) 快慢指针相遇时,创建第二个慢指针 s 阅读全文
posted @ 2018-11-07 22:45 flowingfog 阅读(80) 评论(0) 推荐(0) 编辑

摘要: 分析 难度 易 来源 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 阅读全文
posted @ 2018-11-07 16:57 flowingfog 阅读(69) 评论(0) 推荐(0) 编辑