Why my code is not right [python]


  • 0
    A
    class Solution(object):
        def merge(self, nums1, m, nums2, n):
            nums1 = filter(lambda a:a!=0,nums1)
            nums2 = filter(lambda a:a!=0,nums2)
            nums1.extend(nums2)
            nums1.sort()

Log in to reply
 

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