ds

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2019 License: ISC Imports: 0 Imported by: 0

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue interface {
	Size() int
	IsEmpty() bool
	Enqueue(interface{})
	Dequeue() interface{}
	Peek() interface{}
	Contains(interface{}) bool
}

Queue represents a stack data structure

func NewQueue

func NewQueue(nodeSize int, compare func(a, b interface{}) int) Queue

NewQueue creates a new array-list queue

type Stack

type Stack interface {
	Size() int
	IsEmpty() bool
	Push(interface{})
	Pop() interface{}
	Peek() interface{}
	Contains(interface{}) bool
}

Stack represents a stack data structure

func NewStack

func NewStack(nodeSize int, compare func(a, b interface{}) int) Stack

NewStack creates a new array-list stack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL