Common Algorithms in Go