Water filling algorithm in golang. Solution for a twitter interview