leetcode 88[easy]---Merge Sorted Array

难度: easy

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.

Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initialized in nums1 and nums2 are m and n respectively.

思路:给定两个已经排序的array nums1 和nums2,将nums2 加入nums1中,成为一个有序的array。要求原位操作。
          双支针法,从nums1的最末数开始,谁大谁加入,然后再将指针前移一格。
          如果有一个array 的指针走到最前面以后,就跳出while循环,然后将剩余的加入nums1的前面。

leetcode 88[easy]---Merge Sorted Array