Skip to main content

Hipster

Description

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

Dependencies

Python 3

Installation

pip install --upgrade hipster

Usage

from hipster.heap import *

max_heap = MaxHeap()           # creates an empty max heap
max_heap.push(item)            # pushes a new item on the heap
item = max_heap.peek()         # returns the largest item from the heap without removing it
item = max_heap.pop()          # pops an item off the max heap
max_heap.clear()               # Removes all items from the heap

License

MIT

Changelog

1.0.6

Added clear, fixed README

Metadata

Release files for hipster 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hipster 1.0.6
File Size Uploaded
hipster-1.0.6.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hipster 1.0.6
File Interpreter ABI Platform
hipster-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / hipster-1.0.6.tar.gz

Download URL hipster-1.0.6.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c014ca9bfb5f8b14824ff7e34f9b2c89d3d68e53d19916dac51106c0ce02f61f
BLAKE2b-256 checksum
How to use checksums
77e52124e455613ccb9f045caebd5d8b59fa34aee89ad20b646e618cb79cd165
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.6-py3-none-any.whl

Download URL hipster-1.0.6-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c90d93925f9dbb564e2d10e61f0d0f9d9bd0e89d437afb353cea587c76c331fc
BLAKE2b-256 checksum
How to use checksums
fa352c83b8cd2669df77fed997ede10addec5ff7b4ce092084fbd93fe6486a99
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 history Release notifications | RSS feed

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

This release

1.0.6 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page