MergeSortFunction Merge sort function is two merge two sorted arrays into third array in sorted form.