MergeSort that sorts a subArray of the main array