   Owww... those linked lists drive me mad!!
  I just spent a whole night solving a very complex linked list problem....! owrrrrrrrr.. they drive me mad !!! This makes me wonder..   What is your most  horrid Linked List encounter?   
  Figuring out how to force garbage collection in C#. Which wasn't that bad actually. Curious what was your problem?   ;  When I was doing a uni prac and it just wouldn't work, and then I realised that I hadn't passed the root node to the init() function (in C). I had said to the guy next to me "If the problem is something this stupid, hit me.", and he actually did. That kinda surprised me.   ;  And from this you learnt that STL is good (when you're allowed to use it)?   ;  I use stl::list when I can nowadays, but I've written so many linked lists that I could do them in my sleep.  I can't event imagine what a complex linked list problem is anymore [wink](This either makes me a smart-ass, or an idiot who's written too many linked lists)   ;Quote:Original post by GDKnightFiguring out how to force garbage collection in C#. Which wasn't that bad actually. Curious what was your problem?Not always as simple as it sounds, though. Same in java, you can be killed by memory leaks left from strong references in collections, even though all useful references are long gone.   ;  I've only ever had one problem with linked lists, and I kept the source code to it and have never made the mistake again, here's the code:while(current!=NULL){if(current->next==NULL)current->next=newitem;current=current->next;}I kept wondering why this kept throwing me into an endless loop, and after 3 hours I was able to find this gem and got my code working properly.   ;  binary trees are more fun, especially b-trees and their variations.   ;  Optimizing a priority queue has to be my special favourite.   ;Quote:Original post by capn_midnightbinary trees are more fun, especially b-trees and their variations.A b-tree is not a sort of binary tree (in general), but they are fun.Of course it is a sort of tree.In reply to the original poster:I find linked lists are quite easy to manage in Lisp.[Edited by - furby100 on December 1, 2005 8:54:32 PM]