Update detect_cycle.py

This commit is contained in:
marina 2023-08-07 15:56:18 -07:00 committed by GitHub
parent 8b3feb691e
commit 544caafaa3
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 has_cycle(self, head) -> bool:
def has_cycle(head) -> bool:
if not head:
return False