why I can realize the algorithm on my computer but not on leetcode


  • 0
    W

    class Solution(object):
    def merge(self, nums1, m, nums2, n):
    nums1 = nums1[:m]
    nums2 = nums2[:n]
    nums1.extend(nums2)
    nums1.sort()

    when

    nums1 = [0]
    m = 0
    nums2 = [1]
    n = 1


Log in to reply
 

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