datastructures

package
v0.0.0-...-f39cbe0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	Queue []T
}

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() T

func (*Queue[T]) Push

func (q *Queue[T]) Push(item T)

type Stack

type Stack[T any] struct {
	Stack []T
}

Stack is a generic stack implementation

func (*Stack[T]) Pop

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

Pop removes and returns the last item from the stack

func (*Stack[T]) Push

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

Push adds an item to the stack

Jump to

Keyboard shortcuts

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