There is a list L. It contains elements of arbitrary type each. How to delete all duplicate elements in such list efficiently? ORDE
For Java could go with this:
private static void removeDuplicates(final List list) { final LinkedHashSet set; set = new LinkedHashSet(list); list.clear(); list.addAll(set); }