Merge Sort in Javascript
Merge sort is both an efficient sorting algorithm and a great way of learning recursion. A merge sort follows three main steps:
- If the array is 1 element long, return the given array because it’s already sorted.
- Split the array into…