Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-2008, 12:58 AM
the_transltr the_transltr is offline
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0
the_transltr is on a distinguished road
Default Whats the use of linked list?

What is the linked list for? Is this analogous to relational database objects?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-23-2008, 08:25 AM
R-G's Avatar   
R-G R-G is offline
Programmer
 
Join Date: Apr 2007
Location: Europe
Posts: 144
Rep Power: 0
R-G is an unknown quantity at this point
Default Re: Whats the use of linked list?

In computer science, a "linked list" is one of the fundamental data structures, and can be used to implement other data structures.
__________________
Like an angel without a sense of mercy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-23-2008, 09:33 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,421
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: Whats the use of linked list?

A linked list can be used to manage a dynamically growing/shrinking list of data. It's primary advantage is for sorting: if each piece of "data" consists of a large data structure, you only have to adjust the links (usually a pointer) rather than copying the data. The biggest disadvantage is in searching through the data, as you have to traverse through all the items on the list preceding it.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-24-2008, 07:58 AM
Chinmoy's Avatar   
Chinmoy Chinmoy is offline
Programming Professional
 
Join Date: Feb 2008
Location: where heaven meets earth
Posts: 308
Rep Power: 7
Chinmoy has a spectacular aura aboutChinmoy has a spectacular aura about
Default Re: Whats the use of linked list?

Linked list is a data structure with the following specifics::
1>Data is dynamically added or removed.
2>Every data object has two parts-a data part and a link part. Tgether they constitute a node.
3>The list can be traversed only through pointers.
4>Every node is an important constituent of the data.
5>The end of the data is always a leaf end.
6>Tree structures(branched link lists) are used to store data into disks.
__________________
God is real... unless declared an integer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-26-2008, 01:06 AM
the_transltr the_transltr is offline
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0
the_transltr is on a distinguished road
Default Re: Whats the use of linked list?

I know this definitions, can anyone give an example of linked list application to the real world?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 03-29-2008, 11:53 AM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 507
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Whats the use of linked list?

Quote:
Originally Posted by the_transltr View Post
I know this definitions, can anyone give an example of linked list application to the real world?
Usually you use linked lists to implement more specialised data structures like stacks, queues and trees (which are lists of lists).

The type of data structure depends heavily on the use case. Say you want a dictionary but do not know the size of your data set before hand and cannot survive length pauses (making a hash table unsuitable because you cannot guarantee you won't need to rehash). You could use a self balancing tree which is less efficient in general but is more consistent than a hash table. Sometimes consistency is better than overall efficiency (i.e. the worst case often dominates rather than the average case, rehashing might be enough to spoil your day if it's a particularly large hash table).

Generally any case where you don't know the size of your data set can utilise linked lists of some form. You can of course create growable arrays (which basically reallocate and copy the entire array each time it needs to grow) but as mentioned above this has issues if you don't want pauses on large data structures.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-29-2008, 10:24 PM
the_transltr the_transltr is offline
Newbie
 
Join Date: Mar 2008
Posts: 5
Rep Power: 0
the_transltr is on a distinguished road
Default Re: Whats the use of linked list?

Thank you all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked list borny86 Pascal/Delphi 9 12-06-2007 12:42 PM
questions about linked lists jkurth Java Help 0 11-10-2007 07:33 PM
Linked lists of strings (C) Panserbjorn C and C++ 1 10-26-2007 05:58 PM
C basics. justin1993 C and C++ 4 07-24-2007 08:56 AM
adding new nodes in a linked list while looping emda321 C and C++ 2 06-18-2007 03:27 AM


All times are GMT -5. The time now is 11:40 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads