import java.util.*;
public class Solution {
    public void merge(int A[], int m, int B[], int n) {
        int length = m + n -1;
        for(int i = m-1,j =n-1;length>i;length--){
            if(i==-1){
                A[length] = B[j];
                j--;
                continue;
            }
            if(j==-1){
                A[length] = A[i];
                i--;
                continue;
            }
            if(A[i]>B[j]){
                A[length] = A[i];
                i--;
            }else{
                A[length] = B[j];
                j--;
            }
        }
    }
}