Merge Sorted Array
Question
Hint
Answer
solution1:I prefer this one, cause it use the python advantage.
class Solution(object):
def merge(self, nums1, m, nums2, n):
"""
:type nums1: List[int]
:type m: int
:type nums2: List[int]
:type n: int
:rtype: void Do not return anything, modify nums1 in-place instead.
"""
nums1[m:] = nums2[:n]
nums1.sort()solution2: this is my answer. it has some problems.
solution3:
Knowledge:
Reference:
Last updated

