Documentation
¶
Overview ¶
Package queue provides a flexible implemenation of the queue ADT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
Option configures aspects of the queue.
type Queue ¶
type Queue interface { // Returns the current length of the queue. Length() int // Returns the current capacity of the queue. Returns -1 for inf capacity. Capacity() int // Returns the element at the head of the queue; does NOT remove it. Panics // if the queue is empty. Front() interface{} // Adds an element to the head of the queue. Push(elem interface{}) // Removes the element at the head of the queue. Panics if the queue is empty. Pop() }
Queue defines the queue ADT.
func NewDQSelect ¶
NewDQSelect creates a new queue with the given deque as the backend.
Click to show internal directories.
Click to hide internal directories.