?
Solved

whats the purpose of a linked list of linked lists?

Posted on 2003-03-06
7
Medium Priority
?
221 Views
Last Modified: 2008-03-03
is there any real application of a linked list of linked lists?
0
Comment
Question by:felps0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Expert Comment

by:akshayxx
ID: 8085985
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
 
LVL 1

Expert Comment

by:cybeonix
ID: 8085987
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
 
LVL 8

Accepted Solution

by:
akshayxx earned 60 total points
ID: 8086070
>>>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!

 
LVL 12

Expert Comment

by:rajeev_devin
ID: 8086096
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
 
LVL 5

Expert Comment

by:Kocil
ID: 8086101
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
 
LVL 1

Expert Comment

by:sarda_ramesh
ID: 8086266
Radix Sort can be implemented that way
0
 
LVL 1

Expert Comment

by:jcaldwel
ID: 8088563
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

770 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