




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





public void test() { f(); }
public class Col { private ArrayList c; public String get() { return c.remove(0); } public void insert(String value) { c.add(value); } }
String[] names = {"John", "Kate", "Laura"}; for (int i=0; i < names.length; i++) System.out.println(names[i]);
Honors Section problems are on the reverse
Java provides two different standard implementations of the List interface: LinkedList and ArrayList.
complexity on a LinkedList than on an ArrayList. What are the complexities in each implementation? Don’t worry if you don’t remember the exact method name, just describe what the method does.
than on a LinkedList. Name/describe the operation, and give the asymptotic complexity in each implementation.
asymptotic complexity either List implementation than on a HashSet. Name/describe the operation, and give the asymptotic complexity in List implementations, and in HashSet.