@@ -0,0 +1,2510 @@
+package ru.matevosyan;%0A%0Aimport java.util.*;%0A%0Apublic class EfficiencyList %7B%0A%0A    private long efficiencyTime;%0A%0A%0A%0A    public long add(Collection%3CString%3E collection, String line, int amount) %7B%0A        this.efficiencyTime = System.currentTimeMillis();%0A%0A        for(int i = 0; i %3C amount; i++) %7B%0A            collection.add(line);%0A        %7D%0A        return this.efficiencyTime = System.currentTimeMillis() - this.efficiencyTime;%0A    %7D%0A    public long delete(Collection%3CString%3E collection, int amount) %7B%0A        this.efficiencyTime = System.currentTimeMillis();%0A%0A        Iterator%3CString%3E iterator = collection.iterator();%0A//        while(iterator.hasNext()) %7B%0A            for (int i = 0; i %3C amount; i++) %7B%0A                iterator.next();%0A                iterator.remove();%0A            %7D%0A//        %7D%0A        return this.efficiencyTime = System.currentTimeMillis() - this.efficiencyTime;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        final String LN = System.getProperty(%22line.separator%22);%0A        List%3CString%3E arrayList = new ArrayList%3C%3E();%0A        List%3CString%3E linkedList = new LinkedList%3C%3E();%0A        Set%3CString%3E treeSet = new TreeSet%3C%3E();%0A%0A        EfficiencyList efficiencyList = new EfficiencyList();%0A%0A        System.out.printf(%22ArrayList%25s%22, LN);%0A        System.out.print(String.format(%22Add time --- %25s%25sRemove time --- %25s%25s%22, efficiencyList.add(arrayList, %22Array%22, 55), LN,%0A                efficiencyList.delete(arrayList, 50), LN));%0A        int i = 0;%0A        for (String str : arrayList) %7B%0A%0A            System.out.printf(%22%25s. element --- %25s%25s%22, i++, str, LN);%0A        %7D%0A        System.out.printf(%22Amount --- %25s%25s%25s%22, i, LN, LN);%0A%0A        System.out.printf(%22LinkedList%25s%22, LN);%0A        System.out.print(String.format(%22Add time --- %25s%25sRemove time --- %25s%25s%22,efficiencyList.add(linkedList, %22Linked%22, 55), LN,%0A                efficiencyList.delete(linkedList, 50), LN));%0A%0A        i = 0;%0A        for (String str : linkedList) %7B%0A%0A            System.out.printf(%22%25s. element --- %25s%25s%22, i++, str, LN);%0A        %7D%0A        System.out.printf(%22Amount --- %25s%25s%25s%22, i, LN, LN);%0A%0A        System.out.printf(%22TreeSet%25s%22, LN);%0A        System.out.print(String.format(%22Add time --- %25s%25sRemove time  --- %25s%25s%22, efficiencyList.add(treeSet, %22Tree%22, 55), LN,%0A                efficiencyList.delete(treeSet, 50), LN));%0A        i = 0;%0A        for (String str : treeSet) %7B%0A%0A            System.out.printf(%22%25s. element --- %25s%25s%22, i++, str, LN);%0A        %7D%0A        System.out.printf(%22Amount --- %25s%25s%25s%22, i, LN, LN);%0A%0A%0A%0A    %7D%0A%0A%0A%7D%0A

add EfficiencyList