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.

Modules are provided for both treaps that enforce uniqueness, and treaps that allow duplicates.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for treap, version 1.00
Filename, size File type Python version Upload date Hashes
Filename, size treap-1.00.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page