LinkedList

package
v0.0.0-...-ba07c95 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 1 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 struct {
	Value interface{}
	// contains filtered or unexported fields
}

func (*Element) Next

func (e *Element) Next() *Element

Next returns the next list element or nil

type LinkedList

type LinkedList struct {
	// contains filtered or unexported fields
}

func ArrayToLinkedList

func ArrayToLinkedList(arr *[]interface{}) *LinkedList

func New

func New() *LinkedList

Creates a new LinkedList and Initializes it and returns

func (*LinkedList) Back

func (ll *LinkedList) Back() *Element

func (*LinkedList) Front

func (ll *LinkedList) Front() *Element

func (*LinkedList) Init

func (ll *LinkedList) Init() *LinkedList

Clears the linkedlist and initializes the root element

func (*LinkedList) Len

func (ll *LinkedList) Len() int

Returns the length of the linked list

func (*LinkedList) ModifyRoot

func (ll *LinkedList) ModifyRoot(e *Element) *LinkedList

func (*LinkedList) Print

func (ll *LinkedList) Print()

func (*LinkedList) PushBack

func (ll *LinkedList) PushBack(val interface{}) *Element

func (*LinkedList) PushFront

func (ll *LinkedList) PushFront(val interface{}) *Element

func (*LinkedList) Remove

func (ll *LinkedList) Remove(e *Element) *Element

func (*LinkedList) ReversedIterative

func (ll *LinkedList) ReversedIterative() *LinkedList

func (*LinkedList) ReversedRecursive

func (ll *LinkedList) ReversedRecursive(e *Element) *LinkedList

Jump to

Keyboard shortcuts

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