Merge Sort


There is an array of integers given. You have to sort the array using the merge sort algorithm.

Write a function solve that have the following parameter(s):
1.) arr = array of integer

Example
Input:
There is an array of integers given:
arr = [3,9,7,2]
Output:
The function will return,
[2, 3, 7, 9]

Constraints
• The number of elements will be greater than or equal to 1 and less than or equal to 600.
• Every element in the array will be greater than or equal to 1 and less than or equal to 10000.