Today, I was talking with one of my friends about how we studied data structures in freshmen/sophomore years and how some troubled in understanding pointers. Joel probably says that, it is an aptitude that not everyone can have. So, just then an analogy for linked list hit in my imagination and my friend told me to write about it.
Think of a treasure hunt:
– You are given an address of a house, you should start by visiting there
– In each house you will find an address to another house, you have to visit that house next
– At some point you will reach a house which do not refer to a next house; your treasure is in that house
Traversing a (singly forward) linked list works exactly the same way.
Hope this analogy helps.