deque

package
v0.0.0-...-bb18aec Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack[T any] struct {
	// contains filtered or unexported fields
}

func New

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

func (*Stack[T]) Empty

func (s *Stack[T]) Empty() bool

Empty 栈是否为空

func (*Stack[T]) Len

func (s *Stack[T]) Len() int

Len 栈元素个数

func (*Stack[T]) Peek

func (s *Stack[T]) Peek() T

Peek 栈顶元素

func (*Stack[T]) Pop

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

Pop 出栈

func (*Stack[T]) Push

func (s *Stack[T]) Push(elem T)

Push 入栈

Jump to

Keyboard shortcuts

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