Question d’entretien chez Amazon

Calculate the nth fibonacci sequence. How would you optimize the algorithm.