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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for treap-1.30.tar.gz
Algorithm Hash digest
SHA256 d829e6bdbd48d61518ebc33edb4ae875698a748c09a846c6c3f1a1cc2c5b3adf
MD5 e457ef93153a2dc52ea057a099d5125c
BLAKE2b-256 7e9edff11e016a5881fc7f031f96a0d7361d9cc22510faa15a44a21601127657

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