Hipster
Hipster provides a simple implementation of the MinHeap and MaxHeap. The object being added to the respective heaps need to implement the comparator logic. The APIs are identical for MinHeap and MaxHeap
Installation
Use pip to install the module
pip install hipster
Usage
>>> from hipster.heap import MaxHeap>>> max_heap = MaxHeap()>>> max_heap.push(6)>>> max_heap.push(9)>>> max_heap.push(3)>>> max_heap.peek()>>> 9>>> max_heap.pop()>>> 9>>> max_heap.pop()>>> 6
Metadata
Release files for hipster 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hipster-1.0.3.tar.gz | 1.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hipster-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.6 kB
Release files / hipster-1.0.3.tar.gz
| Download URL | hipster-1.0.3.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de9c06c1fe920c637335d5f03f2611d6e1163d404485ae901fe8c48777be952c
|
|
BLAKE2b-256 checksum How to use checksums |
706f4ffd608ef8bd19e18afddda379c961fa3e2ac309a4b102ae3aee9d3aeb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5rc1
|
Release files / hipster-1.0.3-py3-none-any.whl
| Download URL | hipster-1.0.3-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
266fea71bf474c4a0e86eb50ddd6f234c8f6154b6ea9a40a2aa8100e3c89df7b
|
|
BLAKE2b-256 checksum How to use checksums |
5c3423cc24d224c75a8307dddf58a27454d06d2ef131447c0bcc470ddbfc9a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5rc1
|