Update detect_cycle_II.py

This commit is contained in:
marina 2023-08-07 15:56:27 -07:00 committed by GitHub
parent 544caafaa3
commit f6e853a5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ class Node:
self.next = None
def detect_cycle(self, head):
def detect_cycle(head):
seen = set()
node = head