LinkedLists as arrays
java.util.LinkedList is a special type of collection designed for sequential access (stacks and queues). Being used as a random-accesed array, it is much slower than other List implementations. For instance, getting an item by index (
get(n)) has constant complexity
ArrayLists, while for
LinkedList, the complexity of that operation is
Vector if synchronization is required) for random-accessed lists.