You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an array nums of n integers where nums[i] is in the range [1, n],
return an array of all the integers in the range [1, n] that do not appear in nums.
Solution 1
See problem 442!
First pass: mark the numbers visited, just like in p 422.
Second pass: use list comprehension to return the mising numbers.
Solution 2
Using a set instead of a mark negative pass, using more space