r/learnprogramming • • 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

85 comments sorted by

View all comments

Show parent comment

-1

u/[deleted] Jan 31 '14 edited Feb 01 '14

but you'll never across a real world example where the next item in a linked list would be physically after the previous node.

It doesn't have to be. I never said that linked lists are restricted in way you described. The arrays are, but the question is not about the arrays.

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 point of linked list(and any DS) for that matter is 'S'tructuring data, not the concrete implementation and storing data, but you knew that, right?