stack

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Overview

Package stack implements a fully generic stack. It is essentially a public interface for internal/stackequeuebase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack[T any] struct {
	*stackqueuebase.Base[T]
}

Stack is a generic queue.

func NewStack

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

NewStack creates an empty Stack.

func NewStackN

func NewStackN[T any](size int) *Stack[T]

NewStackN creates an empty Stack with |size| elements worth of preallocated memory.

Jump to

Keyboard shortcuts

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