79538842

Date: 2025-03-27 12:29:01
Score: 2
Natty:
Report link

CPython's Lib/heapq.py is implemented using the binary heap. Your implementation is based on another data structures with different asymptotic runtime complexity.

Runtime complexity of heaps

As such, it's totally possible there exists a graph where your implementation can perform faster than the official one. In any case, it's important to benchmark both of them on different graphs.

References:

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Ivan Tishchenko