Heapq_max
Description
A maxHeap version of heapq module for Python. Similar to heapq, c implementation is used when available to ensure performance.
Dependencies
Python 2 or 3
Installation
pip install heapq_max
Usage
tl;dr: same as heapq module except adding ‘_max’ to all functions.
from heapq_max import *
heap_max = [] # creates an empty heap
heappush_max(heap_max, item) # pushes a new item on the heap
item = heappop_max(heap_max) # pops the largest item from the heap
item = heap_max[0] # largest item on the heap without popping it
heapify_max(x) # transforms list into a heap, in-place, in linear time
item = heapreplace_max(heap_max, item) # pops and returns largest item, and
# adds new item; the heap size is unchanged
License
MIT
History
0.21
Small fix of download URL&README
0.2
Add Python 2 support
0.1 & 0.11
First version, only supports Python 3
Metadata
Release files for heapq_max 0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| heapq_max-0.21.zip | 7.0 kB | Without provenance | Details |
Release files / heapq_max-0.21.zip
| Download URL | heapq_max-0.21.zip |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7576e0066ea40e337c3eb93810a09ac25b0560d129eee3c56b0743fd110ce06
|
|
BLAKE2b-256 checksum How to use checksums |
59fe9bf1cb20552b7c0e1251f3315d3fce72567fd3217c7893b7a0ed6dc79b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for heapq_max 0.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.