Data structures give order to the abstract world of code (software). There are many types of data structure. Among them linked list is the most fundamental type of data structure. Using one or another form of linked list, other data structures (queues or stacks for example) can be created.
Let us look at the theory behind linked list. I promise to try and make it interesting.

The basic unit of a linked list is what is called a node. A node is something like a Lego brick, many of which you can combine to create something. As with the Lego brick, there are different types of nodes, but the most basic form contains a data element and a reference element.
A linked list is nothing but a set of nodes where the reference element points to the next node of the list. The last node has its reference element empty. If a list is supposed to hold the details of all songs in a particular album, the number of nodes will be equal to the number of songs. The first node will contain the details of the first song, and the reference will be pointing to the next node containing details of the second song. And this goes on until we reach the last node.
Designing the nodes in different fashion and setting up the linked list in a particular way, we can get many different configurations of the linked list.
As mentioned earlier, these linked lists can be configured to form other specific type of data structures. It depends on how nodes are added and removed from the list. Operations to add and remove nodes to the list are defined in a particular way. It can actually be done in several ways, but by putting a constraint on how these operations are done, the linked list morph into other data structures.
Comments
Hey Jonah ...
Hey Jonah - not a problem. Since you have given an attribution link, it is OK. :)
Interesting site you have there - bookmarking it for now. Will thumb through it when I get a bit of break.
Thank for dropping by.
Thanks for...
Thanks for this article! The description is very concise and the illustration is great. I hope you don't mind, I'm using the illustration on an article I wrote (I put backlinks to this article so I'm hoping it's OK).
The article is about writing a LinkedList class in JavaScript using the MooTools library:
http://www.thetruetribe.com/2008/05/linkedlist-class-in-mootools.html
Add new comment