双指针及可

import java.util.*;
public class Solution {
    public void merge(int A[], int m, int B[], int n) {
        int[] C = new int[m+n];
        int i,j,k;
        
        i=j=k=0;
        while(i<m&&j<n){
            if(A[i]<B[j])C[k++]=A[i++];
            else C[k++]=B[j++];
        }
        while(i<m)C[k++]=A[i++];
        while(j<n)C[k++]=B[j++];
        
        for(i=0; i<m+n;i++)A[i]=C[i];
    }
}