diff --git a/python/06_linkedlist/singlyLinkedList.py b/python/06_linkedlist/singlyLinkedList.py index ec090a91..12a037dc 100644 --- a/python/06_linkedlist/singlyLinkedList.py +++ b/python/06_linkedlist/singlyLinkedList.py @@ -276,7 +276,7 @@ def has_ring(self): slow = self.__head while (fast.next_node is not None) and (fast is not None): - fast = fast.next_node + fast = fast.next_node.next_node slow = slow.next_node if fast == slow: return True