MCPcopy Create free account
hub / github.com/algorithm006-class02/algorithm006-class02 / heapreplace

Function heapreplace

Week_01/G20200343030608/heapq.py:25–37  ·  view source on GitHub ↗

Pop and return the current smallest value, and add the new item. This is more efficient than heappop() followed by heappush(), and can be more appropriate when using a fixed-size heap. Note that the value returned may be larger than item! That constrains reasonable uses of this

(heap, item)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

_siftupFunction · 0.85

Tested by

no test coverage detected