Why does this Python beat 94% of submissions? Language specific advantage with range?


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

Log in to reply
 

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