Skip to main content

A flexible skiplist data structure that also supports O(logn) cumulative sums

Project description

A flexible implementation of the skiplist data structure

This implementation of skiplist unlocks the full potential of the data structure by also allowing for both sorted and non-sorted skiplists and also enabling O(logn) search by cumulative sums.

In short, it can serve as the standard sorted key-value store (as do other implementations), but it can also allow you to keep a non-sorted list which gives you O(logn) calculation of sums from beginning to k-th element.

Or, as was the use case the author needed but did not find, both at the same time - a sorted list with search into it also by cumulative sums.

The code is written in pure Python 3 without external dependencies and is moderately optimized.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexible-skiplist-0.1.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

flexible_skiplist-0.1.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

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