mergesort-by-eli
v1.0.3
Published
![recursion diagram](<https://raw.githubusercontent.com/elishamutang/recursion/main/asset/Merge-Sort-Algorithm-(1).png>)
Downloads
3
Readme
Recursion
Contents
This package contains two JS files namely fibSeq.js and mergeSort.js as part of The Odin Project curriculum. The concept of recursion is emphasized here in both fibSeq.js and mergeSort.js to produce their respective outputs.
fibSeq.js
fibSeq.js contains two methods of producing a Fibonnaci sequence up to and including the nth number. The first method was by using plain iteration using a for loop whereas the second method is by using recursion.
mergeSort.js
mergeSort.js is an algortihm called 'Merge Sort' that utilizes recursion to sort an unsorted array. In a nutshell, the algorithm takes the mid-point index of an array and splits itself into two sub-arrays recursively, sorts the sub array in ascending order, and merge them to form the resulting sorted array.