I merge A and B without extra space, and the time complexity is O(m+n)

```
public void merge(int A[], int m, int B[], int n) {
int i=m-1;
int j=n-1;
int k=m+n-1;
while(k>=0){
if(m==0){
A[k]=B[j];
j--;
k--;
}else if(n==0){
return;
}
else if(i>=0&&j>=0){
if(A[i]>=B[j]){
A[k]=A[i];
i--;
k--;
}
if(A[i]<B[j]){
A[k]=B[j];
j--;
k--;
}
}
}
```

}