@@ -0,0 +1,1154 @@
+/**%0A *Given an array of integers where 1 %E2%89%A4 a%5Bi%5D %E2%89%A4 n (n = size of array), some elements appear twice and others appear once.%0A *%0A *Find all the elements of %5B1, n%5D inclusive that do not appear in this array.%0A *%0A *Could you do it without extra space and in O(n) runtime? You may assume the returned list does not count as extra space.%0A *%0A *Example:%0A *%0A *Input:%0A *%5B4,3,2,7,8,2,3,1%5D%0A *%0A *Output:%0A *%5B5,6%5D%0A */%0Aclass Solution %7B%0A    public List%3CInteger%3E findDisappearedNumbers(int%5B%5D nums) %7B%0A        List%3CInteger%3E list = new ArrayList%3C%3E();%0A        List%3CInteger%3E last = new ArrayList%3C%3E();%0A        int size = nums.length;%0A        for(int i = 0; i %3C= size; i++) %7B%0A            if (i %3C size) list.add(nums%5Bi%5D);%0A            if (i %3E 0) last.add(i);%0A        %7D%0A        last.removeAll(list);%0A        return last;%0A    %7D%0A%7D%0A%0A/**%0A * better method%0A */%0Aclass Solution %7B%0A    public List%3CInteger%3E findDisappearedNumbers(int%5B%5D nums) %7B%0A        List%3CInteger%3E list = new ArrayList%3C%3E();%0A        int size = nums.length;%0A        Arrays.sort(nums);%0A        for(int i = 1; i %3C= size; i++) %7B%0A           if (Arrays.binarySearch(nums, i) %3C 0) list.add(i);%0A        %7D%0A        return list;%0A    %7D%0A%7D%0A

Create FindAllNumbersDisappearedInAnArray.java