Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 624 Bytes

uheapq.rst

File metadata and controls

27 lines (16 loc) · 624 Bytes

uheapq -- heap queue algorithm

uheapq

python:heapq.

This module implements the heap queue algorithm.

A heap queue is simply a list that has its elements stored in a certain way.

Functions

heappush(heap, item)

Push the item onto the heap.

heappop(heap)

Pop the first item from the heap, and return it. Raises IndexError if heap is empty.

heapify(x)

Convert the list x into a heap. This is an in-place operation.