Documentation ¶
Index ¶
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 { MaxLevel int // contains filtered or unexported fields }
A SkipList maintains an ordered collection of key:valkue pairs. It support insertion, lookup, and deletion operations with O(log n) time complexity Paper: Pugh, William (June 1990). "Skip lists: a probabilistic alternative to balanced trees". Communications of the ACM 33 (6): 668–676
func (*SkipList[K, V]) Range ¶
func (s *SkipList[K, V]) Range(from, to K, op func(v V))
Range interates `from` to `to` with `op`.
Click to show internal directories.
Click to hide internal directories.