Implementation of algorithms in Go