Skip to content

Commit 7090d5a

Browse files
authored
Fixed bug at FDPWR
1 parent 1f61f51 commit 7090d5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Maths/Fibonacci.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ const FibonacciDpWithoutRecursion = (number) => {
8585
for (let i = 2; i < number; ++i) {
8686
table.push(
8787
sgn ?
88-
table[i - 2] - table[i - 1]
88+
table[i - 1] - table[i]
8989
:
90-
table[i - 1] + table[i - 2]
90+
table[i] + table[i - 1]
9191
)
9292
}
9393
return table

0 commit comments

Comments
 (0)