Skip to main content

Pure Python scapegoat tree nodule

Project description

A pure python scapegoat splay tree class is provided. It is thoroughly unit tested, passes pylint, and is known to run on CPython 2.x, CPython 3.x, Pypy 2.2 and Jython 2.7b2.

This scapegoat tree looks like a dictionary that’s always sorted by key. It also reorganizes itself on every put.

Perhaps the most interesting thing about a scapegoat tree, is it is balanced even for ordered keys, without any storage overhead (unlike treaps and red-black trees).

Supported by

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