def findDisappearedNumbers(self, nums): """ :type nums: List[int] :rtype: List[int] """ return list(set(range(1, len(nums)+1)) - set(nums))
Besides, the Runtime: 266 ms.
Not fast enough, I saw someone solve this problem within 30 ms. Wandering how them did.
@yarving But 272ms had already beaten 90.52% of answers, so I guess this one is fine.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.