标签:style blog color io ar div sp log on
public class Solution { public void merge(int A[], int m, int B[], int n) { int i=m-1, j=n-1, k=m+n-1; while(i>=0 && j>=0) { if (A[i] > B[j]) A[k--] = A[i--]; else A[k--] = B[j--]; } if (i==-1) { while (j>=0) A[k--] = B[j--]; } } }
标签:style blog color io ar div sp log on
原文地址:http://www.cnblogs.com/yuhaos/p/3958819.html