8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d267d72 commit 88bd8d7Copy full SHA for 88bd8d7
src/algorithms/math/fibonacci/fibonacci.js
@@ -1,4 +1,9 @@
1
-// Return a fibonacci sequence as an array
+/**
2
+ * Return a fibonacci sequence as an array.
3
+ *
4
+ * @param n
5
+ * @return {number[]}
6
+ */
7
export default function fibonacci(n) {
8
const fibSequence = [1];
9
src/algorithms/math/fibonacci/fibonacciNth.js
-// Calculate fibonacci number at specific position using Dynamic Programming approach.
+ * Calculate fibonacci number at specific position using Dynamic Programming approach.
+ * @return {number}
export default function fibonacciNth(n) {
let currentValue = 1;
let previousValue = 0;
0 commit comments