Skip to main content

class based heap queue algorithm implemented in python

Project description

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

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

python_heapq-0.0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

python_heapq-0.0.1-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file python_heapq-0.0.1.tar.gz.

File metadata

  • Download URL: python_heapq-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for python_heapq-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fc03d655d80ee02824a077d70a2672d2d336a1c06139d9ff8674056e4c0f476d
MD5 e7cdfa624784893ac923a6f610452ee7
BLAKE2b-256 207ab11bcf78cd15889831eef08569aa54d1bf650c7d3bb4e419f067b0baf7a4

See more details on using hashes here.

File details

Details for the file python_heapq-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_heapq-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for python_heapq-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8acec5266f5b1750dc8e87578a3dfe7a01727eebd610613ea0d57b5a7ca56e2
MD5 cd97dfd20b6a6eb8cd75e9bf11a85761
BLAKE2b-256 956e656b875e895fb8691726ed257ff1ffaf101e59a34e8f4ecd5f9353a959bc

See more details on using hashes here.

Supported by

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