Beginner
Array or linked list: which should you choose?
Reveal answer and example
Arrays store indexed elements with good locality. Linked lists store nodes with links; they trade index access and extra allocation for convenient splicing when a node and its predecessor are already known.
Example: Use an array for a scoreboard read by rank; a list can help splice a known work item.
Common mistake: Saying linked-list deletion is always constant time ignores finding the node.
Follow-up: How would the choice change when most operations are iteration?