stack

package
v0.0.0-...-f6453c5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 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 LinkStack

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

LinkStack 链表实现的堆栈

func NewLinkStack

func NewLinkStack() *LinkStack

func (*LinkStack) Clear

func (s *LinkStack) Clear()

func (*LinkStack) Length

func (s *LinkStack) Length() int

func (*LinkStack) Peek

func (s *LinkStack) Peek() (interface{}, bool)

func (*LinkStack) Pop

func (s *LinkStack) Pop() (interface{}, bool)

func (*LinkStack) Push

func (s *LinkStack) Push(i interface{})

type StaticStack

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

StaticStack 数组实现的堆栈

func NewStaticStack

func NewStaticStack(size int) *StaticStack

func (*StaticStack) Capacity

func (s *StaticStack) Capacity() int

func (*StaticStack) Clear

func (s *StaticStack) Clear()

func (*StaticStack) Length

func (s *StaticStack) Length() int

func (*StaticStack) Peek

func (s *StaticStack) Peek() (interface{}, bool)

func (*StaticStack) Pop

func (s *StaticStack) Pop() (interface{}, bool)

func (*StaticStack) Push

func (s *StaticStack) Push(i interface{}) bool

Jump to

Keyboard shortcuts

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