diff --git a/src/algorithms/math/fibonacci/fibonacci.js b/src/algorithms/math/fibonacci/fibonacci.js index f623e9ae..3230dfdd 100644 --- a/src/algorithms/math/fibonacci/fibonacci.js +++ b/src/algorithms/math/fibonacci/fibonacci.js @@ -1,4 +1,9 @@ -// Return a fibonacci sequence as an array +/** + * Return a fibonacci sequence as an array. + * + * @param n + * @return {number[]} + */ export default function fibonacci(n) { const fibSequence = [1]; diff --git a/src/algorithms/math/fibonacci/fibonacciNth.js b/src/algorithms/math/fibonacci/fibonacciNth.js index c5d33928..76bbbe87 100644 --- a/src/algorithms/math/fibonacci/fibonacciNth.js +++ b/src/algorithms/math/fibonacci/fibonacciNth.js @@ -1,4 +1,9 @@ -// Calculate fibonacci number at specific position using Dynamic Programming approach. +/** + * Calculate fibonacci number at specific position using Dynamic Programming approach. + * + * @param n + * @return {number} + */ export default function fibonacciNth(n) { let currentValue = 1; let previousValue = 0;