Missing Numbers

  • + 0 comments
    Java Solution:-
    
    public static List<Integer> missingNumbers(List<Integer> arr, List<Integer> brr) {
        // Write your code here
            // Collections.sort(arr);
            for(int i=0;i<arr.size();i++)
            {``
                brr.remove(arr.get(i));
            }
            Set<Integer> set=new HashSet<>(brr);
            List<Integer> crr=new ArrayList<>(set);
            Collections.sort(crr);
            return crr;
        }