algorithms written in go