stack

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 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 MinStack

type MinStack struct {
	// contains filtered or unexported fields
}

MinStack ...

func NewMinStack

func NewMinStack() MinStack

NewMinStack ...

func (*MinStack) GetMin

func (ms *MinStack) GetMin() int

GetMin ...

func (*MinStack) Pop

func (ms *MinStack) Pop()

Pop ...

func (*MinStack) Push

func (ms *MinStack) Push(x int)

Push ...

func (*MinStack) Top

func (ms *MinStack) Top() int

Top ...

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

Stack is a FILO stack

func NewStack

func NewStack() *Stack

NewStack returns a new stack

func (*Stack) Pop

func (s *Stack) Pop() interface{}

Pop pops the top value out of the stack

func (*Stack) Push

func (s *Stack) Push(v interface{})

Push pushes a value to the stack

Jump to

Keyboard shortcuts

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