Nick Parlante's online Linked List repository
I started a thread a while back commending Nick Parlante's work and recommending his concise and very well written linked list PDF's.
Unfortunately the threads been archived so I will nevertheless recommend his PDF's again. But this time, let me direct all you interested folks to his link that not only includes linked lists but an umbrella that includes pointers, binary trees etc.
I would recommend it in the very order of the link:
Pointers and memory - Review: Its basically said the same things as K&R but expanded and highlighted upon dangerous pitfalls which proves very usefull in future code. Other literature doesnt seem to as concisely highlight dangers and pitfalls. Because lets be honest here: Pointers are all about errors and misuse!
Linked List Basics - Review: Very difficult to swallow first time, heck even second and third time. Read it, read it again and even after that you may find yourself scrolling through it as a reference. I would stress most heavily: Try to "understand it backwards" through and through. This sounds obvious but I found myself coming back to it a few times before I truly mastered it. In your sleep you should be comfortable with pointers to pointers, when is what pointer in the stack and in the heap etc...
I stress again its so important because all linked lists, binary tress etc, will depend on your basics knowledge.
Linked List Problems - Review. This is where im at currently, nearly complete though. Such a delight to do. The tutorial is self rewarding in that every successive problem is indeed slightly more difficult than the one before it. You get a sense of real progression as you go through and this acts as a "carrot on a stick" effect. You will find yourself tolerating and coding increasingly more complex problems. Almost to the extent of saying "whoa, look at the stuff im doing!" halfway through. This however will all be worthless if you skip to the solution at the end. Do not do this! Cant take the heat? Go back to the theory in the beginning and check the basics. Only once it works, check his solutions, because chances are, his code practices better technique, something to be learnt from. Dont fall into the trap of looking at the solution and saying oh yeah couldn't done that.
Binary Trees and The great tree list recursion problem. Havent done these but did look here and there and the binary trees looked great the first half.
Once again, fantastic, fantastic set of notes. And guess what? When you accomplish the pinnacle of this tutorial in the form of the great tree list recursion problem, no one can say these notes never touched certain topics of linked lists. Know why? Because the "great list" is the hardest there is!
Indeed these tutorials do not touch on circularly linked and doubly linked, but honestly, when you do some of these problems, you can find other forms of linked lists a walk in the park
Downside: It takes slow, very slow. Its painfull. To speed things up, keep the functions you write from each succesive problem and also write a print linked list function so that you can see the list you make as output. HIs solutions only entail the actuall callee functions. For each one you may have to always have a print function and a caller, the main function. Its hard work, its perilous, but worth it.
Heres the link: