Python 1 line


  • 0
    G

    my code:

    class Solution(object):
        def findDisappearedNumbers(self, nums):
            return list(set(range(1,len(nums)+1))-set(nums)&set(range(1,len(nums)+1)))
    

Log in to reply
 

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