Python - Find all numbers disappeared in an Array

  • 0

    from collections import Counter
    class Solution(object):
    def findDisappearedNumbers(self, nums):
    :type nums: List[int]
    :rtype: List[int]
    final = []
    num_len = len(nums) + 1
    nums = Counter(nums)
    for num in range(1, num_len):
    if num not in nums:
    return final

Log in to reply

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