package
Version:
v0.0.0-...-cfe842a
Opens a new window with list of versions in this module.
Published: Nov 6, 2016
License: Apache-2.0
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 queue data strcuture.
The basic operations on a queue are `Enqueue`, which inserts an
element at the end, and `Dequeue`, which deletes an element at
the start.
Queue declaration
New creates a new queue with nil value
IsEmpty checks if queue is empty
Length returns how many elements are in queue
func (q *Queue) Peek() interface{}
Peek return the first element
Pop removes an element from the start of queue and return it
func (q *Queue) Push(element interface{})
Push append an element to the end of queue
Source Files
¶
Click to show internal directories.
Click to hide internal directories.