public void merge(int A[], int m, int B[], int n) {//from A[m + n  1] ,copy the bigger from a[i] and b[k] in sequence
int j = m  1, k = n  1 ,i = m < 1 ? n  1 : m + n  1;
for(; i >= 0 && j >= 0 && k >= 0; i)
A[i] = A[j] > B[k] ? A[j] : B[k];
while(k >= 0) A[i] = B[k];
}
What simple codes in Java, can you make it more simple?


public class Solution {
public static void merge(int A[], int m, int B[], int n) {
int A_index = m1,B_index = n1 ;
while(A_index >= 0 && B_index >=0)
A[A_index+B_index+1] = A[A_index] > B[B_index] ? A[A_index] : B[B_index];
while(B_index >= 0)
A[(A_index+B_index+1)] = B[B_index];
}
}