A implementation of MinMaxHeap with Python language.
Project description
min-max-heap
A implementation of MinMaxHeap with Python language.
Usage
from min_max_heap import MinMaxHeap
heap = MinMaxHeap()
for i in range(100):
heap.push(i)
for i in range(50):
assert heap.pop_min() == i
assert heap.pop_max() == 99 - i
assert heap.is_empty()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
min_max_heap-1.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for min_max_heap-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd79c40f951600c4d0f4106eebca91d7e0f04442d1ee7da169f1b13ff257b37 |
|
MD5 | 9234532facf01bf6bd12459e7b2bea4e |
|
BLAKE2b-256 | 03b3503c0d10c03dbf1be0f9d02063e015dd425021877a3fe8fafbb5e9a4de7c |