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(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.

A pure python version is included, as is a Cython-enhanced version for performance.

Release 1.39 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-python-1.39.tar.gz (106.4 kB view details)

Uploaded Source

File details

Details for the file treap-python-1.39.tar.gz.

File metadata

  • Download URL: treap-python-1.39.tar.gz
  • Upload date:
  • Size: 106.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for treap-python-1.39.tar.gz
Algorithm Hash digest
SHA256 653fe94a5be86ec7d5d79f262bad1e9320eb6b20abe28db4f905e81ace4b254f
MD5 7f7429de01b6c38c7aaa4d03e355e084
BLAKE2b-256 701fc85f29237649190f027982e476b3e919c3e25fe6842011a9e97fb7834e5f

See more details on using hashes here.

Supported by

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