Golang | Leetcode Golang题解之第141题环形链表
题目: 题解: func hasCycle(head *ListNode) bool {if head nil || head.Next nil {return false}slow, fast : head, head.Nextfor fast ! slow {if fast nil || fast.Next nil {return false}slow slow.Nextfast fast.Next.Next}return true }
2024-10-24