[collections] What is a practical, real world example of the Linked List?

In the general case, linked lists are one of the most devilishly useful things you will encounter.

Real world examples:

  • A bunch of people waiting in line for something or other - a special kind of LL called a "queue".

  • The stack of dishes in your china cabinet - a special kind of LL called a "stack".

  • The "take a number" lines (where the numbers have to start over again at "1" at some point) - a special kind of LL called a "circular queue".

Generally the metaphor I like to use for almost all linked data structures though is a deck of cards. Just about anything you can do with linked lists, you can use a deck of cards to visualise. This is particularly handy to show yourself what is going on in some of the more esoteric sorting algorithms.

My personal favorite: Bogosort = play 52 card pickup until your deck is sorted. :-)