stack

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 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 Stack

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

func NewStack

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

func (*Stack[T]) Clear

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

func (*Stack[T]) IsEmpty

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

func (*Stack[T]) IsNotEmpty

func (q *Stack[T]) IsNotEmpty() bool

func (*Stack[T]) Len

func (q *Stack[T]) Len() int

func (*Stack[T]) Peek

func (q *Stack[T]) Peek() (val T, ok bool)

func (*Stack[T]) Pop

func (q *Stack[T]) Pop() (val T, ok bool)

func (*Stack[T]) Push

func (q *Stack[T]) Push(val T)

func (*Stack[T]) String

func (q *Stack[T]) String() string

Jump to

Keyboard shortcuts

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