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 }
Deque basic generic deque (double-ended queue) implementation based on double-linked list
func (*Deque[T]) Back ¶
func (d *Deque[T]) Back() T
Back returns values of the last element in Deque. Calling Back on an empty Deque results in undefined behavior. Complexity - O(1).
func (*Deque[T]) Front ¶
func (d *Deque[T]) Front() T
Front returns values of the first element in Deque. Calling Front on an empty Deque results in undefined behavior. Complexity - O(1).
func (*Deque[T]) PopBack ¶
func (d *Deque[T]) PopBack() T
PopBack returns and removes the last element from Deque. Calling PopBack() on an empty Deque results in undefined behavior. Complexity - O(1).
func (*Deque[T]) PopFront ¶
func (d *Deque[T]) PopFront() T
PopFront returns and removes the first element from Deque. Calling PopFront on an empty Deque results in undefined behavior. Complexity - O(1).
func (*Deque[T]) PushBack ¶
func (d *Deque[T]) PushBack(element T)
PushBack adds element to the end of Deque Complexity - O(1).