partial merge sort