README ¶ skiplist skiplist implementation in go l := skiplist.New[int, string]() l.Insert(1, "10") l.Insert(1, "20") l.Insert(1, "30") v, ok := l.Get(3) // "30", true l.Insert(3, "90") // updates v, ok = l.Get(3) // "90", true ok = l.Delete(3) // true length := l.Length() // 2 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type SkipList func New[K constraints.Ordered, V any](maxLevel ...int) *SkipList[K, V] func (l *SkipList[K, V]) Delete(key K) bool func (l *SkipList[K, V]) Get(key K) (V, bool) func (l *SkipList[K, V]) Insert(key K, val V) func (l *SkipList[K, V]) Length() int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type SkipList ¶ type SkipList[K constraints.Ordered, V any] struct { // contains filtered or unexported fields } func New ¶ func New[K constraints.Ordered, V any](maxLevel ...int) *SkipList[K, V] func (*SkipList[K, V]) Delete ¶ func (l *SkipList[K, V]) Delete(key K) bool func (*SkipList[K, V]) Get ¶ func (l *SkipList[K, V]) Get(key K) (V, bool) func (*SkipList[K, V]) Insert ¶ func (l *SkipList[K, V]) Insert(key K, val V) func (*SkipList[K, V]) Length ¶ func (l *SkipList[K, V]) Length() int Source Files ¶ View all Source files list.go Click to show internal directories. Click to hide internal directories.