package
Version:
v0.0.0-...-4def9c8
Opens a new window with list of versions in this module.
Published: Dec 31, 2015
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package queue implements a queue.
Q is the internal representation of the data structure.
Init initializes the queue data structure.
A queue must be initialized before it can be used.
O(1)
func (q *Q) IsEmpty() bool
IsEmpty returns true the queue has no elements.
O(1)
Len returns the number of elements in the queue.
O(1)
func (q *Q) Pop() interface{}
Pop dequeues an element from the queue.
O(1)
func (q *Q) Push(v interface{})
Push enqueues an element to the queue.
O(1)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.