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 Deque

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

func New

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

func (*Deque[T]) AddFirst

func (d *Deque[T]) AddFirst(elem T)

AddFirst 从队头入队

func (*Deque[T]) AddLast

func (d *Deque[T]) AddLast(elem T)

AddLast 从队尾入队

func (*Deque[T]) Empty

func (d *Deque[T]) Empty() bool

Empty 队列是否为空

func (*Deque[T]) Len

func (d *Deque[T]) Len() int

Len 队列元素个数

func (*Deque[T]) RemoveFirst

func (d *Deque[T]) RemoveFirst() T

RemoveFirst 从队头出队

func (*Deque[T]) RemoveLast

func (d *Deque[T]) RemoveLast() T

RemoveLast 从队尾出队

Jump to

Keyboard shortcuts

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