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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for flexible_skiplist-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691f962ab7926a1029aea408338a92ca26e756d0e79f4e3802b3b3ffccf9476b |
|
MD5 | 9b6093a66be566b72956bc910024f06c |
|
BLAKE2b-256 | 26bb21ee75fbf9083f3e40ef64389b30b63ec175cb8ecf93709fd8c55e120629 |