Encerrado

implement an algorithm in golang