linklist

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoublyLinkedList

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

func NewDoublyLinkedList

func NewDoublyLinkedList[T any]() DoublyLinkedList[T]

func (*DoublyLinkedList[T]) AddEnd

func (l *DoublyLinkedList[T]) AddEnd(data T) (newNode *Node[T])

func (*DoublyLinkedList[T]) AddFront

func (l *DoublyLinkedList[T]) AddFront(data T) (newNode *Node[T])

func (*DoublyLinkedList[T]) Len

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

func (*DoublyLinkedList[T]) MoveNodeToFront

func (l *DoublyLinkedList[T]) MoveNodeToFront(node *Node[T])

func (*DoublyLinkedList[T]) Remove

func (l *DoublyLinkedList[T]) Remove(node *Node[T])

func (*DoublyLinkedList[T]) RemoveLast

func (l *DoublyLinkedList[T]) RemoveLast() (removedNode *Node[T])

type Node

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

Jump to

Keyboard shortcuts

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