This project is part of The Odin Project and it focuses on implementing two fundamental algorithms: generating a Fibonacci sequence and performing a merge sort on an array. These exercises aim to enhance understanding of both iterative and recursive approaches, as well as sorting algorithms.
- The fibs function generates Fibonacci numbers iteratively.
- It takes a number 'num' as input and returns an array containing the first 'num' numbers from the Fibonacci sequence.
- Example: For input 8, the function returns [0, 1, 1, 2, 3, 5, 8, 13].
- The fibsRec function generates Fibonacci numbers recursively.
- Takes a number 'num' as input and returns an array containing the first 'num' numbers from the Fibonacci sequence.
- Merge sort is a divide-and-conquer algorithm for sorting arrays.
- It divides the array into smaller sub-arrays, sorts them recursively, and then merges them back together in a sorted manner.