Raised This Month: $ Target: $400
 0% 

"Linked list"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 01-04-2014 , 06:37   Re: "Linked list"
Reply With Quote #5

Quote:
Originally Posted by friagram View Post
Linklists are cancer
Iono why they even teach them in programming classes.
Just like data structures theory.

Unless it is for a very specific application that requires re-use of the handles for convenient storage and lookup, it's a complete waste, which almost always is the case.
They are also really hard to iterate through.
what the.... linked lists are wildly used everywhere. in windows kernel too. its the best way to store dynamically allocated variables... linked lists are far superior than reallocating a huge array just to add a single element. also, iterating through a linked list is jsut a few lines:

Code:
LinkedList * element = my_linked_list;
while(element)
{
   ...
   element= element->next;
}
also, what do you mean by convenient lookups? o.O linked lists are not key-value stores... i think you are talking about trees... but then again, tries and binary search trees are efficient, fast and used by every single database server
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 01-04-2014 at 06:51.
Zephyrus is offline
 



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

Forum Jump


All times are GMT -4. The time now is 12:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode