3 ms·
To be fair, LinkedList is of very limited use. I can't think of a scenario I'd use it in beyond an LRU cache.
by emodendroket 10y ago
To be fair, LinkedList is of very limited use. I can't think of a scenario I'd use it in beyond an LRU cache.
- seanwilson 10y ago> To be fair, LinkedList is of very limited use. I can't think of a scenario I'd use it in beyond an LRU cache. It's more the point that not knowing they exist is a very strong indicator you haven't read even introductory text on algorithms and data structures. I barely use them either but when I'm thinking of solutions to problems they're a useful concept to know.
- emodendroket 10y agoYeah, agreed. They are extremely simple.
- Annatar 10y agoA smartly designed doubly-linked list can be used for extremely fast deletion or insertion, as well as handling dynamic memory allocation for arbitrarily large data sets. Linked lists are the foundation of operating systems, especially UNIX and AmigaOS.
- emodendroket 10y agoYeah, OK, that is another good example. But nevertheless, there are a lot of programs you could be asked to write where using a linked list doesn't make any sense.
- falcolas 10y agoIf you're not familiar with intrusively linked lists, it's worth having a gander at. Learning and implementing a few of those gave me a lot more usecases for linked lists.
- vonmoltke 10y agoI have used a "light" linked list (a linked list that contains just three pointers) to efficiently sort arrays with very large records in C.