solved [merge sorted array]