Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kbelltree/odin-recursion

The Odin Project: Recursion
https://github.com/kbelltree/odin-recursion

fibonacci-sequence javascript js merge-sort recursion recursive-functions theodinproject

Last synced: 4 days ago
JSON representation

The Odin Project: Recursion

Awesome Lists containing this project

README

        

# odin-recursion
## The Odin Project: Recursion

This project is focused on creating recursive functions to demonstrate an understanding of recursion. The functions include implementations of the Fibonacci sequence and Merge Sort algorithms.

For more details on this project, please visit [The Odin Project - Project: Recursion](https://www.theodinproject.com/lessons/javascript-recursion).

## Key Project Instructions:

### Fibonacci Sequence
Create two functions that take an integer and return the Fibonacci sequence as an array. The first function, named `fibs`, implements the sequence using a loop. The second function, named `fibsRec`, uses recursion.

**Example:** `fibs(8)` should return `[0, 1, 1, 2, 3, 5, 8, 13]`.
- [Link to my Fibonacci functions](./fibonacci.js)

### Merge Sort
Create a recursive function named `mergeSort` that takes an array of numbers and returns a sorted array using the merge sort method.

**Example:** `mergeSort([3, 2, 1, 13, 8, 5, 0, 1])` should return `[0, 1, 1, 2, 3, 5, 8, 13]`.
- [Link to my merge sort function](./mergeSort.js)