mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
86ad9580b11f56a23a551c445a896d1d54f0e9d9
Add my implementation of an efficient Skiplist. A Skiplist can do insertion, deletion and lookups in O(log N) on average just like balanced trees. It features simpler algorithms though due to purely relying on probabilistic balancing at insertion and not on rebalancing with every modification. This simple structure allowed me to implement some additions on top of the standard algorithms: * Storing distances between elements on each level to efficiently return the index of the element in the Skiplist when doing a lookup. * InsertTailElementSkiplist to explicitly insert an element at the end of the Skiplist. This needs no comparisons and is useful when you can be sure that the new element would be inserted at the end (e.g. for a new print job in the queue with default priority). More features are easily possible, but for now I limited features on those needed for my Local Spooler work. Some references on Skiplists: * ftp://ftp.cs.umd.edu/pub/skipLists/skiplists.pdf * http://drum.lib.umd.edu/bitstream/1903/544/2/CS-TR-2286.1.pdf svn path=/branches/colins-printing-for-freedom/; revision=68191
Description
A free Windows-compatible Operating System
528 MiB
Languages
C
86.9%
C++
10.7%
Python
0.7%
Assembly
0.5%
CMake
0.5%
Other
0.4%