Data Structures Flashcards

1
Q

When is it better to use linked lists instead of arrays and vise versa?

A

Arrays are contiguous areas of memory consisting of equal-site elements indexed by contiguous integers. Good for reads. Bad for insertions/deletions. Good when number of elements is defined. Lists are arbitrary pieces somewhere in the memory, just linked to each other. Good for insertions/deletions, bad for search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly