mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 04:36:08 -04:00
Update detect_cycle.py
This commit is contained in:
parent
8b3feb691e
commit
544caafaa3
@ -9,7 +9,7 @@ class Node:
|
|||||||
self.next = None
|
self.next = None
|
||||||
|
|
||||||
|
|
||||||
def has_cycle(self, head) -> bool:
|
def has_cycle(head) -> bool:
|
||||||
|
|
||||||
if not head:
|
if not head:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user