Question d’entretien chez WePay

Generic JS algorithm problem solving challenge.