public static void merge(int A[], int m, int B[], int n) {//pass
        int pm = m - 1;
        int pn = n - 1;
        int i = m + n -1;
        while (i >= 0 && pm >= 0 && pn >= 0) {
            if (A[pm] > B[pn]) {
                A[i] = A[pm];
                pm--;
            }
            else {
                A[i] = B[pn];
                pn--;
            }
            i--;
        }
        while (pn >= 0) {
            A[pn] = B[pn];
            pn--;
        }
    }