data

package
v0.0.0-...-a84f5f7 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 3 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[V comparable] struct {
	// contains filtered or unexported fields
}

func NewLinkedList

func NewLinkedList[V comparable]() *LinkedList[V]

func (*LinkedList[V]) AddNode

func (l *LinkedList[V]) AddNode(value V)

func (*LinkedList[V]) Duplicate

func (l *LinkedList[V]) Duplicate() *LinkedList[V]

func (*LinkedList[V]) GetLastNode

func (l *LinkedList[V]) GetLastNode() *LinkedListNode[V]

func (*LinkedList[V]) PrintNodes

func (l *LinkedList[V]) PrintNodes() string

func (*LinkedList[V]) Size

func (l *LinkedList[V]) Size() int

func (*LinkedList[V]) StartsAndEndWithValues

func (l *LinkedList[V]) StartsAndEndWithValues(start, end V) bool

type LinkedListNode

type LinkedListNode[V comparable] struct {
	Value  V
	Parent *LinkedListNode[V]
}

type Queue

type Queue[V any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[V any]() *Queue[V]

func (*Queue[V]) In

func (q *Queue[V]) In(val *V)

func (*Queue[V]) IsEmpty

func (q *Queue[V]) IsEmpty() bool

func (*Queue[V]) Out

func (q *Queue[V]) Out() *V

type Stack

type Stack[V any] struct {
	Items []V
}

func NewStack

func NewStack[V any]() *Stack[V]

func (*Stack[V]) Add

func (s *Stack[V]) Add(item V) *Stack[V]

func (*Stack[V]) AddItems

func (s *Stack[V]) AddItems(items []V) *Stack[V]

func (*Stack[V]) LastItem

func (s *Stack[V]) LastItem() V

func (*Stack[V]) Print

func (s *Stack[V]) Print() string

func (*Stack[V]) RemoveItems

func (s *Stack[V]) RemoveItems(count int, reverse bool) []V

func (*Stack[V]) ReverseItems

func (s *Stack[V]) ReverseItems() *Stack[V]

Jump to

Keyboard shortcuts

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