uheapq-heap queue algorithm
This module implements a subset of the corresponding CPython module, as described below.For more information, please refer to the original CPython documentation: heapq.
This module implements the heap queue algorithm.
A heap queue is just a list that stores its elements in some way.
1. Function#
1.1. heappush#
Put elements into the heap.
1.2. heappop#
Pop the first element in the heap and return it.If the heap is empty, an IndexError
is raised.
1.3. heapify#
Convert the list x to a heap.This is an in-place (division exchange sort) operation.
Related Issues not found
Please login GitHub to create issue