linkedlist

package
v0.0.0-...-5d524ee Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedList

type LinkedList[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](items ...T) *LinkedList[T]

New creates a doubly linked list

func (*LinkedList[T]) Dequeue

func (l *LinkedList[T]) Dequeue() (value T, valid bool)

Dequeue returns the first value on the list

func (*LinkedList[T]) Pop

func (l *LinkedList[T]) Pop() (value T, valid bool)

Pop removes a value from the end of the list

func (*LinkedList[T]) Push

func (l *LinkedList[T]) Push(value T)

Push adds a value to the end of the list

Jump to

Keyboard shortcuts

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