You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a general problem with the ListNode class in list_node.py.
The implementation of __eq__ has a while loop that never stops when comparing two cyclic linked lists. This is because it continues to follow next with no cycle detection.
The text was updated successfully, but these errors were encountered:
jpulgarin
changed the title
ListNode.__eq__ goes into infinite loop when comparing cyclic lists
ListNode.__eq__ goes into infinite loop when comparing cyclic lists
Aug 15, 2020
This is a general problem with the
ListNode
class inlist_node.py
.The implementation of
__eq__
has a while loop that never stops when comparing two cyclic linked lists. This is because it continues to follownext
with no cycle detection.The text was updated successfully, but these errors were encountered: