merge sorted array.