3 line python


  • 0
    T

    class Solution(object):
    def findDisappearedNumbers(self, nums):
    """
    :type nums: List[int]
    :rtype: List[int]
    """
    for i in range(len(nums)):

            nums[abs(nums[i])-1]= -abs(nums[abs(nums[i])-1])
        return [f+1 for f in range(len(nums)) if nums[f]>0]

Log in to reply
 

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