141. 环形链表
141. 环形链表

快慢指针解法
1 | func hasCycle(_ head: ListNode?) -> Bool { |
哈希表解法
1 | func hasCycle(_ head: ListNode?) -> Bool { |
Swift 链表 及 实现协议
1 | public class ListNode { |
- Post title:141. 环形链表
- Post author:xxxixxxx
- Create time:2021-02-21 23:49:00
- Post link:https://xxxixxx.github.io/2021/02/21/2000-005-141. 环形链表/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
Comments