In-Place1 [LeetCode] Merge Sorted Array 파이썬 (modify in-place) class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ nums1[m:m+n] = nums2[:] nums1.sort() 2021. 3. 31. 이전 1 다음