Skip to content

Commit b2101fc

Browse files
authored
Fixed F iter
1 parent 03ed1f8 commit b2101fc

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
@@ -11,9 +11,9 @@ const FibonacciIterative = (nth) => {
1111
for (let i = 2; i < nth; i++) {
1212
sequence.push(
1313
sign ?
14-
sequence[i - 2] - sequence[i - 1]
14+
sequence[i - 1] - sequence[i]
1515
:
16-
sequence[i - 1] + sequence[i - 2]
16+
sequence[i] + sequence[i - 1]
1717
)
1818
}
1919

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