448.找到所有数组中消失的数字
class Solution {
public List<Integer> findDisappearedNumbers(int[] nums) {
int[] temp = new int[nums.length+1];
for (int i = 0; i < nums.length; i++) {
temp[nums[i]]++;
}
ArrayList<Integer> list = new ArrayList<>();
for (int i = 1; i < temp.length; i++) {
if(temp[i]==0) list.add(i);
}
return list;
}
}