Skip to main content

Python implementation of treaps

Project description

A set of python modules implementing treaps in pure python is provided.

See also my pyx_treap module, which implements treaps in Cython.

Treaps perform most operations in O(log2(n)) time, and are innately sorted. They’re very nice for keeping a collection of values that needs to always be sorted, or for optimization problems in which you need to find the p best values out of q, when p is much smaller than q.

A module is provided for treaps that enforce uniqueness.

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

treap-2.0.5.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file treap-2.0.5.tar.gz.

File metadata

  • Download URL: treap-2.0.5.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/2.7.17

File hashes

Hashes for treap-2.0.5.tar.gz
Algorithm Hash digest
SHA256 cabdaa35eb6db6fd3482b44ded008e1ec0c49c44bc6741cc370633e523f43765
MD5 098ff18b9aadcb65eac75ad4e819782a
BLAKE2b-256 444b1350d9408a7c5712d35da74d24b15775cc0a26068b0e73d5333187ebce4b

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