stack

package
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 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[E comparable, S ~[]*E] interface {
	Push(value E)
	Pop() (E, error)
	Peek() E
	Contains(value E) bool
	Len() int
	Cap() int
}

Stack is a LIFO sequential access data structure. Access O(n) Search O(n) * Insert O(1) * Delete O(1)

func New

func New[E comparable, S ~[]*E](capacity int) Stack[E, S]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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