heapq
dz / python / docs / stdlib / data_types / heapqNode Tree
Nodes
heappush | |
content | heappush(h, item): push a value onto the heap |
children | heappushpop |
parents | python/docs/stdlib/data_types/heapq |
hyperlink | https://docs.python.org/3/library/heapq.html#heapq.heappush |
location | knowledge/python.dz:353 |
heappop | |
content | heappop(): pop smallest item from heap |
children | heappushpop |
parents | python/docs/stdlib/data_types/heapq |
hyperlink | https://docs.python.org/3/library/heapq.html#heapq.heappop |
location | knowledge/python.dz:358 |
heappushpop | |
content | heappushpop(h, val): Push item on the heap, then pop and return the smallest item from the heap. The combined action runs more efficiently than heappush() followed by a separate call to heappop(). |
parents | heappush, heappop, python/docs/stdlib/data_types/heapq |
flashcard (front) | What is heappushpop and why would you use it? |
flashcard (back) | heappushpop pushes an item onto the heap then returns the smallest item from the heap. The combined action runs more efficiently than heappush/heappop |
location | knowledge/python.dz:363 |