package
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: Feb 9, 2019
License: ISC
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
ds
Data Structure |
Description |
Queue |
First-in first-out (FIFO) |
Stack |
Last-in first-out (LIFO) |
heap
Heap |
Description |
MinHeap |
Min-Heap priority queue |
MaxHeap |
Max-Heap priority queue |
st
Symbol Table |
Ordered |
Self-Balancing |
Description |
BST |
Yes |
No |
Binary search tree |
AVL |
Yes |
Yes |
AVL binary search tree |
RedBlack |
Yes |
Yes |
Red-Black binary search tree |
Documentation
¶
type Queue interface {
Size() int
IsEmpty() bool
Enqueue(interface{})
Dequeue() interface{}
Peek() interface{}
Contains(interface{}) bool
}
Queue represents a stack data structure
func NewQueue(nodeSize int, compare func(a, b interface{}) int) Queue
NewQueue creates a new array-list queue
type Stack interface {
Size() int
IsEmpty() bool
Push(interface{})
Pop() interface{}
Peek() interface{}
Contains(interface{}) bool
}
Stack represents a stack data structure
func NewStack(nodeSize int, compare func(a, b interface{}) int) Stack
NewStack creates a new array-list stack
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.