r/learnprogramming • u/FantasticFourSkin • Jan 31 '14
Can someone ELI5 linked lists?
Part of my assignment for my online class involves linked lists and we don't really go over them. I looked around online and I'm slightly confused by all the explainations since I'm fairly new to programming. Can someone dumb it down for me?
77
Upvotes
View all comments
Show parent comment
-1
u/[deleted] Jan 31 '14
Well, I and NIST disagree, here is what NIST says: linked list Definition: A list implemented by each item having a link to the next item.
It stores a link to a next item, it doesn't define underlying structure or anything else for that matter...
Obviously you can implement linked list using array of objects, but that is not part of definition, so...
Linked list is not defined in terms of computer memory, and it's location in memory, and location of its elements in memory.
What I described is a linked list example, You can easily add another extension cord to the list, or insert it into the list. The behavior of extension cords from this perspective closely resembles linked list.
But I will leave you with your knowledge.