
"""
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of 
elements in nums1 and nums2 respectively.

Merge nums1 and nums2 into a single array sorted in non-decreasing order.
Source : https://leetcode.com/problems/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.
        """
        for i in range(m, len(nums1)):
            nums1[i] = nums2[i-m]
            
        nums1.sort()


"""
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of 
elements in nums1 and nums2 respectively.

Merge nums1 and nums2 into a single array sorted in non-decreasing order.
Source : https://leetcode.com/problems/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.
        """
        for i in range(m, len(nums1)):
            nums1[i] = nums2[i-m]
            
        nums1.sort()

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of  elements in nums1 and nums2 respectively.  Merge nums1 and nums2 into a single array sorted in non-decreasing order. Source : https://leetcode.com/problems/merge-sorted-array/ Do not return anything, modify nums1 in-place instead.