Question d’entretien chez PayPal

some algorithm question regarding array