Skip to content

Commit b775d6d

Browse files
committed
leetcode
1 parent 1476f9b commit b775d6d

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

LinkedListCycle/linked_list_cycle..go

-10
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ type ListNode struct {
66
Next *ListNode
77
}
88

9-
/*
10-
11-
ListNode? fast = head;
12-
while (fast != null && fast.next != null) {
13-
head = head?.next;
14-
fast = fast.next?.next;
15-
if (head == fast) return true;
16-
}
17-
return false;
18-
*/
199
func hasCycle(head *ListNode) bool {
2010
if head == nil || head.Next == nil {
2111
return false

0 commit comments

Comments
 (0)