From 2dcb85d581e5ed9ae75e817bf2e90c7c8ae97e7c Mon Sep 17 00:00:00 2001 From: Akshay Sharma Date: Mon, 26 Sep 2016 16:09:59 +0530 Subject: [PATCH] PEP style --- dynamic_programming/fibonacci.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dynamic_programming/fibonacci.py b/dynamic_programming/fibonacci.py index c790d41d8..5733f693a 100644 --- a/dynamic_programming/fibonacci.py +++ b/dynamic_programming/fibonacci.py @@ -4,6 +4,7 @@ This is a pure Python implementation of Dynamic Programming solution to the fibo class Fibonacci: + def __init__(self, N=None): if N: N = int(N) @@ -12,7 +13,7 @@ class Fibonacci: self.fib_array[1] = 1 for i in range(2, N + 1): self.fib_array[i] = self.fib_array[ - i - 1] + self.fib_array[i - 2] + i - 1] + self.fib_array[i - 2] else: self.fib_array = [None] * (N + 1)