This repo is a version of ThePrimeagen's kata-machine repo ported to Go. You can use it to go through his Data Structures & Algorithms course using Go instead of TypeScript. There are also a few other niceties, like Wikipedia links for the descriptions of different data structures and algorithms.
- Insertion sort
- Merge sort
- Quick sort
- Bubble sort
- Prim's Minimum Spanning Tree
- Adjacency List
- Dijkstra's Shortest Path
- Adjacency List
- Linear search
- Binary search
- Binary Tree Traversal
- Pre-Order
- In-Order
- Post-Order
- Depth-first search on Binary Search Tree
- Depth-first search on graph
- Adjacency List
- Breadth-first search on graph
- Adjacency List
- Adjacency Matrix
- Maze solver
- Two Crystal Balls problem
- Singly linked list
- Doubly linked list
- Array list
- Ring buffer
- Queue
- Stack
- Graph
- Adjacency List
- Adjacency Matrix
- Binary tree
- Min-Heap
- Trie
- Hashmap
- Least Recently Used cache
Make sure you have Go and Python installed:
go version
python3 -VClone the repo:
git clone https://github.com/Agent-E11/kata-machine-goCreate a day of katas:
python3 ./scripts/generate.pyThis will progressively create folders named like this:
./day0
./day1
...
You can now edit the Go files in the (for example) ./day0/ folder, and follow
along with the course.
To test all of your code (e.g. the day0 folder), run:
go test -v ./day0/...Or, if you want to test a specific algorithm/data structure (e.g. arraylist):
go test -v ./day0/arraylist