diff --git a/dynamic_programming/fast_fibonacci.rb b/dynamic_programming/fast_fibonacci.rb index 3e5e857..7d2d3cc 100644 --- a/dynamic_programming/fast_fibonacci.rb +++ b/dynamic_programming/fast_fibonacci.rb @@ -4,5 +4,5 @@ def fast_fibonacci(number, memo_hash = {}) if number == 0 || number == 1 return number end - memo_hash[number] ||= fibonacci(number - 1, memo_hash) + fibonacci(number -2, memo_hash) -end \ No newline at end of file + memo_hash[number] ||= fibonacci(number - 1, memo_hash) + fibonacci(number - 2, memo_hash) +end