My 4 line python code


  • 1
    J
    def missingValue(self, nums):
        res = len(nums)
        for i in range(len(nums)):
            res += i - nums[i]
        return res

Log in to reply
 

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