please provide a complete (more than just 4 pictures) explanation of a linked list with less programming.

what is a real world (less programming) explanation of a linked list?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

is it homework? I will try a simple explanation not using pictures or code.

a linked list is a container for arbitrary elements (for example strings or integers, but also complex class or structure elements) similar to an array.

unlike to an array the elements are not placed side by side (en bloc) such that you could step from one to the next by adding the size of one element to the current position, but the elements are linked and each element may have an arbitrary location in memory. the link was made by adding a pointer to each element, what actually means that an element of a linked list actually is a pair of the real element and the pointer to the next pair. such a pair was called node and a linked list is a collection of nodes therefore. a node pointer also may be NULL what means that the end of list is reached. in a doubly linked list we have two pointers, one pointing to the next node and pointing back. the backwards pointer is NULL for the first node of a doubly linked list.

in a linked list you can iterate by using the node pointer(s) to step from one node to the next (or previous) one. it is "cheap" to insert a new node anywhere into the list as you only have to change pointers. that is an advantage over other containers where you may have to move many elements to get a free space for the new element. a disadvantage of the linked list is that you (normally) don't have indexed access to the elements. to step to the nth element you always have to read all (n-1) nodes before.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgb192Author Commented:
okay pointer can point to null or next

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.