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.
Release 1.22 is pylint’d and is known to run on at least CPython 2, CPython 3 and Pypy 1.4.1.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file treap-1.22.tar.gz.
File metadata
- Download URL: treap-1.22.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6171c2daf86d7324271523ba9a46354e5f1253bc2919a9c16ac5a47aaf5dba8
|
|
| MD5 |
2282cd32cbed70a1ef7b7f84ce32cf3f
|
|
| BLAKE2b-256 |
9259db25f4131615d2d3dcc76c03116cf2eaed43b1a3e5c64f2f3a69db7a5f7e
|