Common algorithm implementations in Go.