Linked lists

Started by
3 comments, last by Andrew Russell 18 years, 10 months ago
Can someone explain linked lists to me. I've checked all the sites, I need a basic explanation and example. Thanks. :) Adam L
bi-FreeSoftware
Advertisement
No homework questions. =D

Since this sounds too much like homework, I'll keep it simple and let you figure out implementation.

You have an object, it has a "pointer" as an attribute which points to another object of the same type. This next object has a pointer attribute which points to the next object. By keeping track of the first object and placing each sucessive object in the pointer of the last object, you can find every object in this list just by following the trail of pointers.

Imagine a book, where every page was jumbled up, but each page told you where the next page is. From page 12, the next page is 27.
william bubel
Take a look at this thread.
Quote:Original post by AdamGL
I've checked all the sites,


My god man! You must have super-human web-browsing powers! You don't need to know how to write a linked list with those powers on your side!
-------------------------Rayoom Sledge Hammer Productions - Programmer
You're obviously not very good at searching the internet.

At least if this is homework, that won't give you any more information than you could probably find in your text book. Closed.

This topic is closed to new replies.

Advertisement