Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


> 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.


Yeah, agreed. They are extremely simple.


A 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.


Yeah, 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.


If 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.


I have used a "light" linked list (a linked list that contains just three pointers) to efficiently sort arrays with very large records in C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: