Documentation
¶
Index ¶
Constants ¶
View Source
const MaxLevel = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkipList ¶
type SkipList[T any] struct { // contains filtered or unexported fields }
func NewSkipList ¶
func NewSkipList[T any](cmp jit.Comparator[T]) *SkipList[T]
func SkipListOf ¶
func SkipListOf[T any](cmp jit.Comparator[T], slice []T) *SkipList[T]
func (*SkipList[T]) Exists ¶
Exists checks if the target element exists in the skip list and returns true if found, otherwise returns false.
func (*SkipList[T]) GetByIndex ¶
GetByIndex retrieves the value at the specified index in the skip list. The index starts from 0.
func (*SkipList[T]) Insert ¶
func (sl *SkipList[T]) Insert(val T)
Insert inserts a value into the skip list.
Click to show internal directories.
Click to hide internal directories.