lazy deletion
RU: ленивое удаление
A trick for heaps without decrease-key: instead of updating an entry, push a duplicate with the better priority and skip stale entries when they are popped. Dijkstra's algorithm uses it with a binary heap.
RU: ленивое удаление
A trick for heaps without decrease-key: instead of updating an entry, push a duplicate with the better priority and skip stale entries when they are popped. Dijkstra's algorithm uses it with a binary heap.