Skip to content

448 Find All Numbers Disappeared in an Array

448. Find All Numbers Disappeared in an Array

题目: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/

难度:

Easy

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


回到顶部