RecapDifficulty: Advanced1 min

Recap: Lists

Two storage models, the operations each wins, growth by copying, and safe removal.

Lists come down to the six ideas below, each listed with the card that covers it.

What the topic established, and which card it was on
The ideaWhere
Identical methods, opposite storage, opposite costsArrayList vs LinkedList: How Each Stores Its Elements
Positional reads are arithmetic on one and a walk on the otherArrayList vs LinkedList Example: Reading by Position in a Loop
Inserting at the front shifts everything on one and changes two pointers on the otherArrayList vs LinkedList Example: Inserting at the Front
An ArrayList starts empty and grows by copyingHow an ArrayList Grows When Its Array Is Full
Use ArrayList unless the work is at the front or middle; then try ArrayDequeChoosing Between ArrayList, LinkedList and ArrayDeque
Remove with removeIf or the iterator, never through the list mid-loopConcurrentModificationException: Removing Inside a for-each Loop

The interface tells you nothing about cost, on purpose; the operation your code does most decides.