Skip to main content

Python implementation of treaps

Project description

A set of python modules implementing treaps is provided.

Treaps perform most operations in O(log2n) 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.

Pure python versions are included, as are Cython-enhanced versions for performance.

Release 1.31 is pylint’d and is known to run on at least CPython 2.x, CPython 3.x and Pypy, Pypy3 (beta) and Jython.

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-1.34.tar.gz (87.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: treap-1.34.tar.gz
  • Upload date:
  • Size: 87.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for treap-1.34.tar.gz
Algorithm Hash digest
SHA256 8d42c99cb44c7810019e0e89598f830b7f0d6dc584f99a41e0ba25cfe7c34eb8
MD5 3b2d79f1c1fbe3478a0a490457c6e70e
BLAKE2b-256 2a06c4f1d0fe016e7ee3548d3c1e427ce0a236ae576aaa607107bbf58c59f823

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