Python 3 lines


  • 0
    T
    class Solution(object):
        def findDisappearedNumbers(self, nums):
            x = [i for i in range (1,len(nums) + 1)]
            diff = list(set(x).difference(set(nums)))
            return diff
    

Log in to reply
 

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