Question d’entretien chez Bank of America

Very simple algorithm questions