heapreplace function pops the smallest element off the heap and then pushes a new element onto it. : Heapreplace : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Heapreplace »

 

heapreplace function pops the smallest element off the heap and then pushes a new element onto it.


heap = [5803679142]
heapify(heap)
print heap
heapreplace(heap, 0.5)
print heap
print heapreplace(heap, 10)
print heap



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Heapreplace