Skip to main content

Class Based Heapq Algorithm

Install

pip install python-heapq

Example

Priorityq pushes and pops while maintaining the structure of the heap. Push an element and then pop it to get a sorted list.

from python_heapq import priorityq

queue = priorityq([]) # init heapq data

queue.push(2)
queue.push(4)
queue.push(1)
queue.push(7)

while queue.data:
    poped = queue.pop()
    print(poped)

# 1
# 2
# 4
# 7

Metadata

Release files for python-heapq 0.0.1

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

Source distribution (sdist)

Source distribution for python-heapq 0.0.1
File Size Uploaded
python_heapq-0.0.1.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-heapq 0.0.1
File Interpreter ABI Platform
python_heapq-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.8 kB

Release files / python_heapq-0.0.1.tar.gz

Download URL python_heapq-0.0.1.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc03d655d80ee02824a077d70a2672d2d336a1c06139d9ff8674056e4c0f476d
BLAKE2b-256 checksum
How to use checksums
207ab11bcf78cd15889831eef08569aa54d1bf650c7d3bb4e419f067b0baf7a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / python_heapq-0.0.1-py3-none-any.whl

Download URL python_heapq-0.0.1-py3-none-any.whl
Size 1.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8acec5266f5b1750dc8e87578a3dfe7a01727eebd610613ea0d57b5a7ca56e2
BLAKE2b-256 checksum
How to use checksums
956e656b875e895fb8691726ed257ff1ffaf101e59a34e8f4ecd5f9353a959bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

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