Documentation ¶
Index ¶
- type LinkList
- type Node
- type SkipList
- func (s *SkipList) Del(k interface{}) (v interface{}, ok bool)
- func (s *SkipList) Get(k interface{}) (v interface{}, ok bool)
- func (s *SkipList) Len() int
- func (s *SkipList) Range(from, to interface{}, op func(v interface{}))
- func (s *SkipList) Search(k interface{}) (ok bool)
- func (s *SkipList) Set(k interface{}, v interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkipList ¶
type SkipList 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) Range ¶
func (s *SkipList) Range(from, to interface{}, op func(v interface{}))
Range interates `from` to `to` with `op`.
Click to show internal directories.
Click to hide internal directories.