IT_World
[leetcode] 88. Merge Sorted Array 본문
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.
"""
del nums1[m:]
nums1 += nums2[0:n]
nums1.sort()
'Coding test > programmers - single' 카테고리의 다른 글
[leetcode] 94. Binary Tree Inorder Traversal (0) | 2022.04.04 |
---|---|
[leetcode] 83. Remove Duplicates from Sorted List (0) | 2022.04.03 |
[leetcode] 70. Climbing Stairs (0) | 2022.04.02 |
[leetcode] 39. Combination Sum (0) | 2022.04.01 |
[leetcode]77. Combinations (0) | 2022.03.31 |
Comments