dynamic_programming.fibonacci

This is a pure Python implementation of Dynamic Programming solution to the fibonacci sequence problem.

Classes

Fibonacci

Functions

main(→ None)

Module Contents

class dynamic_programming.fibonacci.Fibonacci
get(index: int) list

Get the Fibonacci number of index. If the number does not exist, calculate all missing numbers leading up to the number of index.

>>> Fibonacci().get(10)
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
>>> Fibonacci().get(5)
[0, 1, 1, 2, 3]
sequence = [0, 1]
dynamic_programming.fibonacci.main() None