Skip list data structure for JavaScript. See docs.
⚠️ Depending on your environment, the code may requireregeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.
import {decreasing} from '@total-order/primitive';
import {range} from '@iterable-iterator/range';
import {SkipList} from '@data-structure/skip-list';
const list = SkipList.from(decreasing, range(10000));
[...list]; // [9999, 9998, ...]
list.add(...)
list.get(...)
list.has(...)
list.remove(...)