We have an array of size m+n in which m elements are present, in sorted order, and a second array of size n, again in sorted order. We want both of
Move the contents of the first array to the end of the first array, such that the empty elements are now at the beginning. Then merge the two sequences as usual into the first array.