Python implementation of treaps
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.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size treap-1.31.tar.gz (87.2 kB)||File type Source||Python version None||Upload date||Hashes View|