S log n merge sorted