My python3 solution


  • 0
    Y
    class Solution(object):
        def findDisappearedNumbers(self, nums):
            """
            :type nums: List[int]
            :rtype: List[int]
            """
            res = set(range(1, len(nums)+1))
            nums_set = set(nums)
            return list(res - nums_set)
    

Log in to reply
 

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