Compared with array lists, linked lists are better at:
AHashing and mapping
BInsertion and deletion
CIndexing and slicing
DSorting and merging
Answer & Solution
Correct answer: B. Insertion and deletion
1. Adding or removing in an array shifts many elements.
2. A linked list only relinks two pointers.
3. So it is better at insertion and deletion.
_Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._
Keep practising Data Structures and Algorithms
Browse all Data Structures and Algorithms questions for Coding Interview Prep, or explore more Computer Science topics.