Pergunta de entrevista da empresa Adobe

Video interview: Write a function that finds the nth fibonacci number. What is the time/space complexity? Best/worst case scenario?

Resposta da entrevista

Sigiloso

9 de jan. de 2019

1st version: recursive function 2nd version: recursive function using an array for values already calculated 3rd version: iterative function using two int variables that stored the two most recent values, eventually used to calculate the nth number.