Question d’entretien chez MathWorks

Write an algorithm for generating the Fibonacci sequence and how would you optimise it.