Data Structures & Algorithms in Go

Linear

  • Stack
  • Queue
  • Double Linked List
  • Circular Buffer
  • Deque (segmented array), Not possible in Go

Tree — hierarchical, parent/child relationships

  • Binary Search Tree
  • AVL Tree
  • Heap (min/max)
      • Priority Queue
  • Trie

Graph

  • Unweighted
  • Weighted

Sets

  • Union Find
      • Bloom filter
      • Hyper Log Log

Algorithms ωψγ

  • Kadane's Algorithm
  • Euclidean GCD
  • Fibonacci
  • Heap Sort
  • Modular Arithmetic
  • Sieve of Eratosthenes
  • BFS Breadth-First Search
  • DFS Depth-First Search
  • Miller Rabin prime test

Documentation

linear Structures

go doc -all ./linear | bat -l go

algorithms

go doc -all ./algo | bat -l go

Sets

go doc -all ./sets/ | bat -l go

trees

for p in ./trees/ ./trees/avl ./trees/heap; do go doc -all "$p"; done | bat -l go

Tests

go test ./tests/...

External references

https://xlinux.nist.gov/dads/

Disclosure

Unit tests and explanations written by claude

S
Description
No description provided
Readme 205 KiB
Languages
Go 100%