LeetcodeLinked ListOn this pageLinked ListCycle Detection Floyd's Tortoise and Hare 龜兔賽跑算法,slow和fast都從head開始 Tortoise (slow pointer)一次前進1 Hare (fast pointer)一次前進2 如果Linked List內存在Cycle,slow跟fast必定會相遇