Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Link Lists...
Reply
Posted 2002-04-08, 06:00 PM
can someone explain to me what the advantages of linked lists are and why you would ever use them?

Thanks
Old
Profile PM WWW Search
spa is neither ape nor machine; has so far settled for the in-betweenspa is neither ape nor machine; has so far settled for the in-between
 
spa
 



 
Reply
Posted 2002-04-08, 08:29 PM in reply to spa's post "Link Lists..."
Linked lists are more efficient from a memory standpoint. An array allocates a large chunk of data, and any of that space that's not used by the array just sits in memory. In contrast, linked lists allocate the memory they need on the fly, at the expense of a little CPU power.
I think I'm lost.
Old
Profile PM WWW Search
Badass Gandhi is neither ape nor machine; has so far settled for the in-betweenBadass Gandhi is neither ape nor machine; has so far settled for the in-between
 
Badass Gandhi
 



 
Reply
Posted 2002-04-09, 12:06 PM in reply to spa's post "Link Lists..."
Quote:
Linked lists are more efficient from a memory standpoint. An array allocates a large chunk of data, and any of that space that's not used by the array just sits in memory. In contrast, linked lists allocate the memory they need on the fly, at the expense of a little CPU power.
Well actually, for those very reasons, which is more efficient is dependant upon what you're going to do with those lists. If the list size is never going to vary much, and never need to be rearanged, then an array is the way to go, but if the list size is going to vary wildly, or has no upper bound, or if you have a fairly large list that you need to be able to quickly reorder, then a linked list is the way to go.

Sounds like spa's teacher isn't very thorough
--WetWired

Edit: 
pronoun clarification

Last edited by WetWired; 2002-04-09 at 12:13 PM.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2002-04-09, 12:09 PM in reply to spa's post "Link Lists..."
Nah, I think my teacher was thorough enough. I was just trying to mention the basics, that's all.

The stuff you brought up could have been inferred from what I wrote, anyway.
I think I'm lost.
Old
Profile PM WWW Search
Badass Gandhi is neither ape nor machine; has so far settled for the in-betweenBadass Gandhi is neither ape nor machine; has so far settled for the in-between
 
Badass Gandhi
 



 
Reply
Posted 2002-04-09, 12:12 PM in reply to spa's post "Link Lists..."
Actually, I was talking to spa, who appears from his questions to be enrolled in a High School level computer science course of some sort.

It's clear that you know what you're talking about
--WetWired
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2002-04-09, 12:16 PM in reply to spa's post "Link Lists..."
D'oh!
I think I'm lost.
Old
Profile PM WWW Search
Badass Gandhi is neither ape nor machine; has so far settled for the in-betweenBadass Gandhi is neither ape nor machine; has so far settled for the in-between
 
Badass Gandhi
 
 

Bookmarks

« Previous Thread | Next Thread »

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

Posting Rules [Forum 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
Forum Jump


All times are GMT -6. The time now is 02:01 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.