难度:easy

Given a linked list, determine if it has a cycle in it

思路:1.时刻注意节点是否不为零

           2. 设计两个指针,一个快,一个慢,快一次走两步,慢指针一次走一步,如果快指针与慢指针会相同,则表 示 链 表是循环链表。


leetcode 141-Linked List Cycle

相关文章:

  • 2021-07-08
  • 2021-08-08
  • 2021-09-22
  • 2022-01-06
  • 2022-03-08
  • 2022-02-11
  • 2021-12-16
猜你喜欢
  • 2022-01-09
  • 2021-04-23
  • 2021-09-14
  • 2021-12-05
  • 2022-02-02
  • 2022-01-05
  • 2021-10-04
相关资源
相似解决方案