Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

whats the purpose of a linked list of linked lists?

is there any real application of a linked list of linked lists?
0
felps0
Asked:
felps0
1 Solution
 
akshayxxCommented:
well it depends on the requirement and on the mood of the programmer..
many times .. even if the task can be dont in simpler ways .. programmers do it in twisted way ..

of the many possible examples one simple example i can think of is..
list of students .. and for each student list of subjects and grades in it

0
 
cybeonixCommented:
Absolutley.. I did my own API in C that wraps up the windows API into what closely resembles a decent Object oriented interface.  One of those "classes" is my layout class for organizing objects (windows controls) which automatically proportion and resize themselves according to the properties set on them.   The layout control itself allows you to nest layouts within layouts.  Each layout in itself contains a linked list of objects.

Gives it a nice way to infinitely recurse a list.
0
 
akshayxxCommented:
>>>is there any real application of a linked list of linked lists?
if u mean that each node should be of same type ( both in main list and in the nested list) ..
then 'cybeonix' example fits in very well.
and another example can be .

if you were asked to build a family tree .. then also u'll need that .. cause u never know who can have how many children.
so each node will have list of children..which again will have its list of children
0
Independent Software Vendors: 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!

 
rajeev_devinCommented:
Let me give you a very simple example. Say you are storing the index of a small dictionary. In the first linked list you can store the alphabets, and a pointer from each node of this linked list will point to another linked list that will contain the words beginning with that alphabet in the form of binary tree. For example, node havving alphabet A will point to the linked list containing the words beginning with A. Hope this example may clarify your doubts.
0
 
KocilCommented:
Sure, why not ?

For example:
In a class you have several courses -> linked list
Then each courses has several students -> linked list, linked to the course

[course1]->[course2]->[course3]->[NULL]
   |
[student1]
   |
[student2]
   |
[NULL]
0
 
sarda_rameshCommented:
Radix Sort can be implemented that way
0
 
jcaldwelCommented:
I used have used it recently for a financial application.

I had some accounts for a customer, and and transaction history (in one large mass for the customer). I built a linked list of the accounts, each of which contained a linked list of history.
0

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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now