Question d’entretien chez Cutshort

Pirate Gold Distribution Problem - The algorithm