Modify Merge sort on array