arraylist hw, contains collapseDuplicates(ArrayList<Integer> L){}