finish merge-sorted-array