Easter Merge Sort

Sorting Merge Sort Algorithms

Problem: Easter Merge Sort

On April 12, we remember Yuri Gagarin's historic flight into space in 1961—a true demonstration of planning and precise sequencing. In the spirit of that achievement, your task is to implement the merge sort algorithm. Merge sort is an efficient, comparison-based, divide and conquer sorting algorithm.

Task

Implement a merge sort algorithm that takes an array (or list) of integers and returns a new array with the integers sorted in ascending order.

Requirements

  • Write a function that accepts an unsorted array of numbers.
  • Return a new array that is the sorted version of the original array.
  • Use the merge sort algorithm to perform the sorting.

Example

Input: [38, 27, 43, 3, 9, 82, 10]

Output: [3, 9, 10, 27, 38, 43, 82]

Starter Code

Below is some language-agnostic starter code to help you begin. Choose the language of your preference from the provided options.