Depends on your requirements. Is it the right data structure? Usually, doubly linked lists aren't the right one to use. Unless you happen to be fetching the items like if you were some kind of Anal Touring machine.
Name:
Anonymous2013-02-21 21:09
Totally, I use them all the time. I find the protection provided by storing a pointer to a random memory location a good way to deter hackers. Sometimes I make my triple link list, then use them as a singly linked list, and fill the other two with garbage, so debugging will be harder.
I'd like to make quadruply linked list, but the trade offs are a little to steep.
Name:
Anonymous2013-02-22 2:27
I.. don't get it.
So you have a pointer to the next node, one to the previous node and.. where does the third pointer go?
Name:
Anonymous2013-02-22 2:32
>>4
To the current node. tll->thisnode->data = tll->->thisnode->thisnode->thisnode->data = tll->->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->thisnode->data
It's pretty hard to tell without explaining how it's being used. If you're using a binary search tree and using another pointer to handle collisions, then it may or may not be beneficial depending on the type of data you're handling. For example, if you're just inserting and comparing against strings, then you'd probably be better off using an integer which keeps track of how many duplicates there are, rather than allocating the same data over and over again. On the other hand, if you have a string for comparison and you're inserting other data which is likely to vary with two strings that compare equal, then there aren't many other choices.
Name:
Anonymous2013-02-22 5:35
>>1
if you need triple linked lists in your program then yes, it's worth it.