skip-linked-list 0.1.1

a skiplist-backed linked list that support fast random writes, written in Rust.
Documentation
  • Coverage
  • 78.95%
    15 out of 19 items documented4 out of 17 items with examples
  • Size
  • Source code size: 42.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.58 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • showbufire/skip-linked-list
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • showbufire

skip-linked-list

a skiplist-backed linked list that support fast random writes, written in Rust.

SkipLinkedList is a skiplist-backed linked-list that supports fast random access. The (amortized) time complexity is O(log n) for both reads and writes, regardless of the position. It is more efficient than Vec and Linkedlist for large list that requires lots of random access.

Examples

let mut list = skip_linked_list::SkipLinkedList::new();

list.push_front(1);
list.push_back(2);
list.insert(1, 3);
list.insert(1, 4);
list.insert(1, 5);
// current list is: [1, 5, 4, 3, 2]

assert_eq!(list.get(1), Some(&5));
assert_eq!(list.get(3), Some(&3));
assert_eq!(list.remove(2), 4);