Skip to content

Commit 7090d5a

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy