Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 331 Bytes

10-Fibonacci.md

File metadata and controls

14 lines (10 loc) · 331 Bytes

Fibonacci

The problem

Write a function f(N) that returns the Nth member of the Fibonacci sequence.

  • use recursion

Concepts

  • Recursion

Notes

  • can be done in very little code
  • the recursion base case relies on first two numbers being 1 and 1
  • the solution has O (2^n) complexity - better solution in next lesion