Video interview: Write a function that finds the nth fibonacci number. What is the time/space complexity? Best/worst case scenario?
Sigiloso
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.