Question
In Java, which comparison about Singly Linked Lists is accurate?
- There is no practical difference in behavior, performance, or API design when Singly Linked Lists is involved.
- The oldest option related to Singly Linked Lists is always the right production choice regardless of context.
- Linked lists simplify pointer-local insertions, while arrays simplify indexed access and cache-friendly iteration.
- Differences around Singly Linked Lists are mostly cosmetic, so correctness and maintainability do not change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: C. Linked lists simplify pointer-local insertions, while arrays simplify indexed access and cache-friendly iteration.
Linked lists simplify pointer-local insertions, while arrays simplify indexed access and cache-friendly iteration. This is the comparison that usually separates memorization from understanding.
Track: Java