Accepted Python solution, but still don't understand the Q


  • -1
    B
    class Solution(object):
        def merge(self, nums1, m, nums2, n):
            nums1[:] = nums1[:m] + nums2[:n]
            nums1.sort()
    

    Are we supposed to merge m elements of nums1 and n elements of nums2 into nums1 in place?
    Is the question asking for this?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.