Skip to content

Commit 8611cda

Browse files
Reorder min-heap functions.
This is a more reasonable order and matches the order of the functions for the max-heap section.
1 parent e663bf6 commit 8611cda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/heapq.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ functions, respectively.
5858
The following functions are provided for min-heaps:
5959

6060

61+
.. function:: heapify(x)
62+
63+
Transform list *x* into a min-heap, in-place, in linear time.
64+
65+
6166
.. function:: heappush(heap, item)
6267

6368
Push the value *item* onto the *heap*, maintaining the min-heap invariant.
@@ -77,11 +82,6 @@ The following functions are provided for min-heaps:
7782
followed by a separate call to :func:`heappop`.
7883

7984

80-
.. function:: heapify(x)
81-
82-
Transform list *x* into a min-heap, in-place, in linear time.
83-
84-
8585
.. function:: heapreplace(heap, item)
8686

8787
Pop and return the smallest item from the *heap*, and also push the new *item*.

0 commit comments

Comments
 (0)