Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution(object):
- def findDisappearedNumbers(self, nums):
- """
- :type nums: List[int]
- :rtype: List[int]
- """
- for i in nums:
- idx = abs(i)-1
- nums[idx] = -1 * abs(nums[idx])
- return [i for i, e in enumerate(nums, 1) if e > 0]
Add Comment
Please, Sign In to add comment