Skip to content

kbelltree/odin-recursion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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.

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].

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].