Question d’entretien chez Salesforce

Algorithm question: pretty similar to two sum.