Commit 3256f98
committed
Update Fibonacci solution, test to focus on arrays
Previous Fibonacci solution didn't use arrays, and since this is an
array-heavy section, it seemed better to have that be the method here.
Also, it accounts for entering 0 as an argument without having to add
any extra code, which takes care of some currently open issues.
Issues TheOdinProject#192 and TheOdinProject#236 are about the same thing.
I added a test for that as well.1 parent 3e530e3 commit 3256f98
File tree
2 files changed
+10
-11
lines changed- 10_fibonacci/solution
2 files changed
+10
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
0 commit comments