Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

min_max_heap-1.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file min_max_heap-1.0.1.tar.gz.

File metadata

  • Download URL: min_max_heap-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for min_max_heap-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f4302dbb85431d0e359dcaa0c1cdb2cc58f6b7abd419c277cfbbca382cacde41
MD5 5f14beb151cc11b28c1aadb9b6fec9fc
BLAKE2b-256 5c65f8cf0c27b273b0c1f21f45b46da2ad26b110e98ea8376effe42ced6f49d6

See more details on using hashes here.

File details

Details for the file min_max_heap-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: min_max_heap-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for min_max_heap-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd79c40f951600c4d0f4106eebca91d7e0f04442d1ee7da169f1b13ff257b37
MD5 9234532facf01bf6bd12459e7b2bea4e
BLAKE2b-256 03b3503c0d10c03dbf1be0f9d02063e015dd425021877a3fe8fafbb5e9a4de7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page