double-linked list

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Mon Jul 1 08:42:55 CEST 2002


yet another question for today...

I want to implement a double-linked list, which I can easily traverse in 
both directions. I wonder if there are any smart solutions you know of...

One way is to maintain two lists, in reversed order from each other, and do 
the hard work when inserting and deleting.

Another way is to implement the classic double-linked list structure and 
algorithms, because the objects in my list are processes and they can store 
the 'next' and 'previous' pointers in their state.

Yet another would be to use an ETS table for storage of the list data.

Does anyone have thoughts about which one (or any other) is recommended? 
Maybe there are different data structures that can fullfill the 
requirements...

Thanks. Best regards,
Vlad

_________________________________________________________________
MSN Hotmail är världens populäraste e-posttjänst. Skaffa dig ett eget konto 
du också: http://www.hotmail.com




More information about the erlang-questions mailing list