How to update elements within a heap? (priority queue)
Typical Solution The usual solution is to mark an element as invalid and insert a new element, then eliminate the invalid entries as they are popped-off. Alternative Solution If that approach doesn’t suffice, it is possible restore the min-heap invariant in O(log n) steps as long as the location of the value being changed is …