Package goalgo provides implementations of some fundamental algorithms, most of which come from the Algorithms course of the university of Princeton.
- Implementations should be clear and appropriately commented.
- Each algorithm or data structure should be accompanied by a runnable example and if possible, a comprehensive test suite.
- Knuth Shuffle
- Quick Find
- Weighted Quick Union
- Selection Sort
- Insertion Sort
- Shell Sort
- Merge Sort
- Quick Sort
- Maximum Heap
- Heap Sort
- Binary Search Tree
- Left-leaning Red Black Tree
- Topological Sorting
- Cycle Detection
- Kosaraju-Sharir's Strongly Connected Components
- Kruskal's Minimum Spanning Tree
- Shortest Paths with Dijkstra, AcyclicSP, and Bellman-Ford
In case you are new to the Go ecosystem, this is a quick start to run things:
$ cd ~
$ mkdir goroot
$ export GOPATH="$HOME/goroot"
$ go install github.com/seri/goalgo
$ cd goroot/src/github.com/seri/goalgo/examples
$ go run sort_client.go