题目就是归并排序
public void merge(int A[], int m, int B[], int n) {
int[] tmp = new int[m+n];
int i=0,j=0,p=0;
while(i<m&&j<n){
if(A[i]<=B[j]){
tmp[p++]=A[i++];
}else{
tmp[p++]=B[j++];
}
}
while(i<m){
tmp[p++]=A[i++];
}
while(j<n){
tmp[p++]=B[j++];
}
p--;
while(p>=0){
A[p]=tmp[p];
p--;
}
}