 All Problems
Find All Numbers Disappeared in an Array
easy
arrays
hash map
amazon
google

Given an array nums of n integers where each value is in range [1, n], return all integers in [1, n] that do not appear.

Example 1:

Input: 4 3 2 7 8 2 3 1
Output: 5 6

Example 2:

Input: 1 1
Output: 2

Input format: Space-separated integers.

Output format: Space-separated missing integers in ascending order.

Run to check your code against the sample cases, or submit to run every case