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
4
u/DestroyerOfWombs Jan 31 '14
Yes it does, because NIST's definition of link is
Which specifically deals with memory. Note that none of the criteria are an actual physical or spacial link, it is entirely defined as an address. The link in your metaphor is physically touching, you can follow it by following the rope. This is a great example for an array structure, but you'll never across a real world example where the next item in a linked list would be physically after the previous node. I can't imagine any circumstance where you would be dealing with linked lists outside of the context of memory since their whole purpose is a way of storing data in memory. The source you linked even suggests that on the very page when it says
Since a pointer is just a memory address, I think we can safely put this issue to bed.