MERGE-SORTED-ARRAY problem