3 ms·
What data structure would you think of when you hear just "list"?
by lpil 6y ago
What data structure would you think of when you hear just "list"?
- qppo 6y agoList is an access pattern, like a queue or deque. Linked lists are a data representation using a couple of pointers. It's like the difference between a graph and an adjacency list or matrix. A list being a linked list is an implementation detail. At least to me. Mostly because linked lists are in general, awful ways to store data.
- lpil 6y agoIt depends on what you want to do with them. They have constant time prepending and support structural sharing, both highly desirable features in many use cases.