Question d’entretien chez Amazon

Find an alternative way to optimize the algorithm.