JavaScript

SkipList.js - A JS Skip List Class

by lhl ( | | | )

Now, you might be saying to yourself, "Ahh, a skip list, one of my favorite data structures!" However, much more likely, you're probably wondering WTF a skip list (NIST reference) is.

A skip list is a randomized variant of an ordrered linked list with additional, parallel lists. This is a probabilistic alternative to balanced trees that in general practice gives O(log n) searching w/ easy inserts and deletions (no tree reshuffling).

This OOP JavaScript implementation was created almost entirely from Pugh's original publication, Skip Lists: A Probabilistic Alternative to Balanced Trees.

XML feed