Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2014-08-13
Medium Priority
Last Modified: 2014-08-15
what is a real world (less programming) explanation of a linked list?
Question by:rgb192
LVL 35

Accepted Solution

sarabande earned 2000 total points
ID: 40260205
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.


Author Closing Comment

ID: 40264661
okay pointer can point to null or next


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans
Suggested Courses
Course of the Month21 days, 6 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question