```
public class Solution {
public void merge(int A[], int m, int B[], int n) {
// try not use new variable
//try include exception in normal control
// try not minus m, n
while(m+n>0){
if(m<1){
A[m + n-1] = B[(n--)-1];
}else if(n<1){
return;
}else if( A[m-1]<= B[n-1]){
A[m + n-1] = B[(n--)-1];
}else{
A[m + n-1] = A[(m--)-1];
}
}
}
}
```