Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
Queue represents a double-ended queue. The zero value is an empty queue ready to use.
func (*Queue[T]) Back ¶
func (q *Queue[T]) Back() T
Back returns the last element of queue q or nil.
func (*Queue[T]) Front ¶
func (q *Queue[T]) Front() T
Front returns the first element of queue q or nil.
func (*Queue[T]) PopBack ¶
func (q *Queue[T]) PopBack() T
PopBack removes and returns the last element of queue q or nil.
func (*Queue[T]) PopFront ¶
func (q *Queue[T]) PopFront() T
PopFront removes and returns the first element of queue q or nil.
func (*Queue[T]) PushBack ¶
func (q *Queue[T]) PushBack(v T)
PushBack inserts a new value v at the back of queue q.
Click to show internal directories.
Click to hide internal directories.