The Fibonacci numbers are the numbers in the following integer sequence characterized by the fact that every number after the first two is the sum of the two preceding ones:
For example:
[0, 1, 1, 2, 3, 5, 8 ...]
We want you write Fibonacci class that realize two implementation:
- Recursive
- Dynamic
-
Look at the file dynamic.py.
-
Run tests: (you will see that all of them FAILED)
python3 -m unittest tests/dynamic_fibonacci_test.py
-
Now, implement Fibonacci class, methods in dynamic.py
-
After running tests all of them should be passed.
-
Compare your answer with mine located in answers/dynamic_fibonacci.py
-
Look at the file brute_force.py.
-
Run tests: (you will see that all of them FAILED)
python3 -m unittest tests/brute_force_fibonacci_test.py
-
Now, complete brute_force_fibonacci.py
-
After running tests all of them should be passed.
-
Compare your answer with mine located in answers/brute_force_fibonacci.py