/dsa-in-go

Data Structures & Algorithms in Go

Primary LanguageGo

Data Structures and Algorithms with Go


The aim of this repository is to provide Gophers with essential knowledge essential data structures and algorithms, and how they are implemented in the Go programming language. I've started this repository as a notepad for my own personal learning, but wanted to open source it for others who could benefit.

When possible, all implementations are backed by unit tests to ensure the code functions as we expect. This mainly applies to the algorithms section, though, if a data structure has methods implemented on it, then it will be backed by a test.

Referenced are many popular texts written for Java and Python, such as:

  • The Algorithm Design Manual - Skiena
  • Elements of Programming Interviews - Adnan Aziz, et al.
  • Algorithms, 4th Edition - Sedgewick & Wayne
  • The Go Programming Language - Donovan & Kernighan

Table of Contents


Fundamental Data Structures

  • Arrays & Slices
    • Static Arrays
    • Dynamic Arrays (known as Slices)
  • Lists
    • Singly-linked lists
    • Doubly-linked lists
  • Stacks/Queue's
    • Stack
    • Queue
    • Priority Queue
  • Dictionaries
  • Heaps
    • Min heaps
    • Max heaps
  • Trees
    • Binary Trees
    • Binary Search Trees
  • Graphs
  • Hash Maps

Algorithms

  • Strings
  • Sorting algorithms
    • Bubble Sort
    • Insertion Sort
    • Quick Sort
  • Searching Algorithms
    • Binary Search
    • Depth First Search
    • Breadth First Search
  • Greedy Algorithms
    • Dijkstra's Algorithm

Algorithmic Problem Solving

  • Back tracking
  • Divide and Conquer
  • ...

References

Much of what you see here is not my original work, though, much of the commentary is. Below is a list (with links) to where I have acquired much of this information.