linked_list

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 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 Node

type Node[T any] struct {
	Value *T
	Prev  *Node[T]
	Next  *Node[T]
}

type Stack

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

func FromSlice

func FromSlice[T any](slice []T) *Stack[T]

func NewStack

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

func (*Stack[T]) Clear

func (s *Stack[T]) Clear()

func (*Stack[T]) IsEmpty

func (s *Stack[T]) IsEmpty() bool

func (*Stack[T]) Length

func (s *Stack[T]) Length() int

func (*Stack[T]) Peek

func (s *Stack[T]) Peek() (*T, bool)

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() (*T, bool)

func (*Stack[T]) Push

func (s *Stack[T]) Push(value *T) *Stack[T]

func (*Stack[T]) ToSlice

func (s *Stack[T]) ToSlice() []T

Jump to

Keyboard shortcuts

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