diff --git a/src/linked_list_cycle.py b/src/linked_list_cycle.py index 529e0e1..1c01935 100644 --- a/src/linked_list_cycle.py +++ b/src/linked_list_cycle.py @@ -1,11 +1,12 @@ -from src.utils.linked_list import ListNode +from utils.linked_list import ListNode class Solution: def hasCycle(self, head: ListNode | None) -> bool: - slow = fast = head + slow = head + fast = head - while slow and fast and fast.next and fast.next.next: + while slow and fast and fast.next: slow = slow.next fast = fast.next.next