stackArray

package
v0.0.0-...-de9bdf8 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 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 StackArray

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

func NewStack

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

NewStack initialize new Stack

func (*StackArray[T]) IsEmpty

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

IsEmpty check if stack is empty

func (*StackArray[T]) IsFull

func (s *StackArray[T]) IsFull() bool

IsFull check if stack is full

func (*StackArray[T]) Peek

func (s *StackArray[T]) Peek() (T, error)

Peek peek top node in the stack

func (*StackArray[T]) Pop

func (s *StackArray[T]) Pop() (T, error)

Pop remove top node in the stack

func (*StackArray[T]) Print

func (s *StackArray[T]) Print()

Print log nodes in the stack

func (*StackArray[T]) Push

func (s *StackArray[T]) Push(x T) error

Push add node to the top of the stack

Jump to

Keyboard shortcuts

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