sortedLinkedList

package
v0.0.0-...-010b5d8 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element[T Ordered] struct {
	// contains filtered or unexported fields
}

func (*Element[T]) Next

func (e *Element[T]) Next() *Element[T]

func (*Element[T]) SetNext

func (e *Element[T]) SetNext(next *Element[T])

type Ordered

type Ordered interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~float32 | ~float64 | ~string
}

type SortedLinkedList

type SortedLinkedList[T Ordered] struct {
	// contains filtered or unexported fields
}

func New

func New[T Ordered]() *SortedLinkedList[T]

func (*SortedLinkedList[T]) Back

func (l *SortedLinkedList[T]) Back() (T, error)

func (*SortedLinkedList[T]) Front

func (l *SortedLinkedList[T]) Front() (T, error)

func (*SortedLinkedList[T]) Get

func (l *SortedLinkedList[T]) Get(index int) (T, error)

func (*SortedLinkedList[T]) Init

func (l *SortedLinkedList[T]) Init()

func (*SortedLinkedList[T]) Insert

func (l *SortedLinkedList[T]) Insert(value T)

func (*SortedLinkedList[T]) InsertAll

func (l *SortedLinkedList[T]) InsertAll(value ...T) error

func (*SortedLinkedList[T]) IsEmpty

func (l *SortedLinkedList[T]) IsEmpty() bool

func (*SortedLinkedList[T]) Iterate

func (l *SortedLinkedList[T]) Iterate() iter.Seq2[int, T]

func (*SortedLinkedList[T]) Len

func (l *SortedLinkedList[T]) Len() int

func (*SortedLinkedList[T]) RemoveBack

func (l *SortedLinkedList[T]) RemoveBack() error

func (*SortedLinkedList[T]) RemoveFront

func (l *SortedLinkedList[T]) RemoveFront() error

Jump to

Keyboard shortcuts

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