merge sort and Rselect