skip to navigation
skip to content

Not Logged In

treap 1.38

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.

Release 1.38 is pylint'd and is known to run on at least CPython 2.x, CPython 3.x and Pypy, Pypy3 (beta) and Jython.

 
File Type Py Version Uploaded on Size
treap-1.38.tar.gz (md5) Source 2014-01-19 82KB
  • Downloads (All Versions):
  • 20 downloads in the last day
  • 202 downloads in the last week
  • 1017 downloads in the last month