blob: 67da5f73805fd9dd8f397ceda11ca2cc5f0404c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
:mod:`uheapq` -- heap queue algorithm
=====================================
.. include:: ../templates/unsupported_in_circuitpython.inc
.. module:: uheapq
:synopsis: heap queue algorithm
|see_cpython_module| :mod:`cpython: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
---------
.. function:: heappush(heap, item)
Push the ``item`` onto the ``heap``.
.. function:: heappop(heap)
Pop the first item from the ``heap``, and return it. Raises IndexError if
heap is empty.
.. function:: heapify(x)
Convert the list ``x`` into a heap. This is an in-place operation.
|