finish median sorted array