Pergunta de entrevista da empresa Cutshort

Pirate Gold Distribution Problem - The algorithm