Python implementation of treaps
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.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pyx_treap-2.0.8.tar.gz (113.7 kB)||File type Source||Python version None||Upload date||Hashes View|