5 ms·
Linked lists are great to know and understand. Linked lists are not good for performance. In most cases, an array or other data structure is much more efficient
by armchairhacker 4y ago
Linked lists are great to know and understand. Linked lists are not good for performance. In most cases, an array or other data structure is much more efficient than a linked list. But there are cases where linked lists' immutability/segmentation or simplicity to implement make them the better choice.
- taeric 4y agoThere are, interestingly, also times when fun facets of the linked lists mutability can lead to benefits. https://taeric.github.io/DancingLinks.html https://taeric.github.io/DancingLinks.html is my attempt at exploring Knuth's DLX algorithm. I can't recommend enough that you look into how he did it. Very fun and exciting use of mutable doubly linked lists.