Documentation
¶
Overview ¶
Package queue provides implementation for Queue data structure https://en.wikipedia.org/wiki/Queue_(abstract_data_type)
Interface methods Enqueue,Dequeue, IsEmpty,Size are the ways to interact with stack data structure. The test file queue_test.go illustrates usage of these methods
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
// Enqueue element to the stack
Enqueue(x interface{})
// Dequeue element
// If queue is empty, returns nil
Dequeue() interface{}
// IsEmpty returns true if queue is empty
IsEmpty() bool
// Length returns number of elements in the queue
Length() int
}
Interface implemented by stack, LIFO
Click to show internal directories.
Click to hide internal directories.