#### 容易 合并排序数组 II

36%

public class Solution {
public void merge(int[] nums1, int m, int[] nums2, int n) {
int aLen = m-1;
int bLen = n-1;
int index = 0;
int[] mix = new int[m+n];
int i = 0;
int j = 0;
while(i<=aLen&&j<=bLen){
if(nums1[i]<nums2[j]){
mix[index] = nums1[i];
index++;
i++;
}else{
mix[index] = nums2[j];
index++;
j++;
}
}
while(i<=aLen){
mix[index] = nums1[i];
index++;
i++;
}
while(j<=bLen){
mix[index] = nums2[j];
index++;
j++;
}
for(int k=0; k<index;k++){
nums1[k] = mix[k];
}
}
}

#### 【LeetCode】Merge-sorted-array

2017-08-02 21:46:44

#### 【leetcode】merge-sorted-array

2014-08-25 21:48:54

#### leetcode merge-sorted-array

2015-06-08 16:12:34

#### leetcode — merge-sorted-array

2018-02-28 09:11:34

#### https://leetcode.com/problems/merge-sorted-array/

2015-04-26 21:55:19

#### merge-sorted-array Java code

2017-11-04 12:05:30

#### Merge Sorted Array -- LeetCode

2014-02-22 23:27:09

#### Leetcode_88_Merge Sorted Array

2014-11-30 23:37:26

#### Leetcode：88. Merge Sorted Array（JAVA）

2016-03-13 09:49:08

#### 关于LeetCode中Merge Sorted Array一题的理解

2016-09-17 22:02:44

## 不良信息举报

merge-sorted-array