Git Product home page Git Product logo

go-datastructures's Introduction

Go Data Structures

GoDoc Go Report Card

Project to keep track of my learnings and experiments while learning the Go programming language and reviewing the common Abstract Data Types (ADT), data structures, and algorithms.

Installation

$ go get github.com/kevinpollet/go-datastructures

Abstract Data Types & Data Structures

List

type List interface {
	Add(value interface{})
	Clear()
	Get(index int) (interface{}, error)
	IndexOf(value interface{}) int
	Insert(index int, value interface{}) error
	IsEmpty() bool
	Remove(index int) (interface{}, error)
	Size() int
}

Stack

type Stack interface {
	Clear()
	IsEmpty() bool
	Peek() (interface{}, error)
	Pop() (interface{}, error)
	Push(value interface{})
	Size() int
}

Queue

type Queue interface {
	Clear()
	IsEmpty() bool
	Offer(value interface{})
	Peek() (interface{}, error)
	Poll() (interface{}, error)
	Size() int
}

Dequeue / Double-ended Queue

type Dequeue interface {
	Clear()
	IsEmpty() bool
	OfferFirst(value interface{})
	OfferLast(value interface{})
	PeekFirst() (interface{}, error)
	PeekLast() (interface{}, error)
	PollFirst() (interface{}, error)
	PollLast() (interface{}, error)
	Size() int
}

PriorityQueue

type PriorityQueue interface {
	Clear()
	IsEmpty() bool
	Offer(value interface{}, priority int)
	Peek() (interface{}, error)
	Poll() (interface{}, error)
	Size() int
}

Readings & Lectures

License

MIT

go-datastructures's People

Contributors

kevinpollet avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.