2 ms·
Linked lists are great when you want a fully persistent data structure version of a stack. (https://en.wikipedia.org/wiki/Persistent_data_structure https://en.
by eru 6y ago
Linked lists are great when you want a fully persistent data structure version of a stack. (https://en.wikipedia.org/wiki/Persistent_data_structure https://en.wikipedia.org/wiki/Persistent_data_structure)
If you don't need persistence, you can often use a dynamic array to do basically everything a linked list can do for you, but most of it faster.
Also, if you have a relocating garbage collector, or otherwise a smart enough compiler (or interpreter), linked lists can become sufficiently efficient.