stack

package
v0.0.0-...-7788d34 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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 ArrayStack

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

ArrayStack 的通用实现 顺序栈的实现

func NewStack

func NewStack(capacity int) *ArrayStack

func (*ArrayStack) Len

func (s *ArrayStack) Len() int

Len

func (*ArrayStack) Peek

func (s *ArrayStack) Peek() string

peek

func (*ArrayStack) Pop

func (s *ArrayStack) Pop() string

出栈

func (*ArrayStack) Push

func (s *ArrayStack) Push(item string) bool

入栈

type LinkedStack

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

func NewLinkedStack

func NewLinkedStack() *LinkedStack

func (*LinkedStack) Len

func (s *LinkedStack) Len() int

func (*LinkedStack) Peek

func (s *LinkedStack) Peek() interface{}

func (*LinkedStack) Pop

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

func (*LinkedStack) Push

func (s *LinkedStack) Push(value interface{}) bool

Jump to

Keyboard shortcuts

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