\begin{verbatim}
   1: void Merge( int A[], int n1, int B[], int n2, int C[] ) {
   2: // Merge the sorted arrays A of length n1 and B of length n2 into C
   3:    int i,j,k;
   4:    i = j = k = 0;
   5:    while( i<n1 && j<n2 )
   6:       if( A[i]<B[j] ) { C[k] = A[i]; i++; k++; }
   7:       else { C[k] = B[j]; j++; k++; }
   8:    while( i<n1 ) { C[k] = A[i]; i++; k++; }
   9:    while( j<n2 ) { C[k] = B[j]; j++; k++; }
  10:    return;
  11: }
\end{verbatim}
