Skip to content

Commit f5716a2

Browse files
committed
Removed unnecessary condition
1 parent 578c85e commit f5716a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

leetcode/0141.Linked-List-Cycle/141. Linked List Cycle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type ListNode = structures.ListNode
1919
func hasCycle(head *ListNode) bool {
2020
fast := head
2121
slow := head
22-
for slow != nil && fast != nil && fast.Next != nil {
22+
for fast != nil && fast.Next != nil {
2323
fast = fast.Next.Next
2424
slow = slow.Next
2525
if fast == slow {

0 commit comments

Comments
 (0)