skiplist

package
v0.0.0-...-89416fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandUint32

func RandUint32() uint32

func RandUint32n

func RandUint32n(n uint32) uint32

Types

type SkipList

type SkipList struct {
	Sentinal  *node
	MaxHeight uint8
	// contains filtered or unexported fields
}

func New

func New() *SkipList

func (*SkipList) Count

func (sl *SkipList) Count() uint64

func (*SkipList) Get

func (sl *SkipList) Get(key []byte) ([]byte, bool)

func (*SkipList) Height

func (sl *SkipList) Height() uint64

func (*SkipList) Print

func (sl *SkipList) Print()

func (*SkipList) Range

func (sl *SkipList) Range(f func(k, v []byte) bool)

func (*SkipList) Remove

func (sl *SkipList) Remove(k uint64) ([]byte, bool)

func (*SkipList) Set

func (sl *SkipList) Set(key, value []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL