Not removing or editing an old entry; push a new one and skip the stale one when it is popped.
Common with heaps in Dijkstra: simpler than decrease-key, at the price of extra entries.
Not removing or editing an old entry; push a new one and skip the stale one when it is popped.
Common with heaps in Dijkstra: simpler than decrease-key, at the price of extra entries.