danielborowski / fibonacci-heap-python

Implementation of a Fibonacci heap in Python
MIT License
90 stars 37 forks source link

Endless Loop occurs #8

Open lancexiang opened 3 years ago

lancexiang commented 3 years ago

https://github.com/danielborowski/fibonacci-heap-python/blob/bb1da219d42acf6a7f30a9a93973af373e93b107/fib-heap.py#L16

when iterate the heap, there occurs a endless loop, i think there is a circle in node and node.right, which means node = node.right, i don't konw how to avoid this? can you solve this? thanks!