题解 | #合并两个有序的数组#
合并两个有序的数组
http://www.nowcoder.com/practice/89865d4375634fc484f3a24b7fe65665
import java.util.*; public class Solution { public void merge(int A[], int m, int B[], int n) { for(int i = 0;i < A.length;i++){ if(i < m){ A [i] = A[i]; }else{ A [i] = B[i-m]; } } Arrays.sort(A); } }