qustion about the double link list

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

qustion about the double link list

 
0
  #1
Mar 15th, 2006
hi every 1
i wanna to ask about sigl and double linked list
*what is the advanyages and desadvantegs of the double linke list

*when we use the double and when we use the single


thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,698
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 730
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: qustion about the double link list

 
0
  #2
Mar 15th, 2006
>*what is the advanyages and desadvantegs of the double linke list
Is this homework? A double linked list allows you to move foward and backward, thus simplifying and optimizing some operations. However, the maintenance of the extra pointer complicates the algorithms.

>*when we use the double and when we use the single
It's largely a matter of taste. I know people who only use double linked lists even when they're overkill. In general, if you use the operations that a double linked list will make easier or faster, you should at least consider using one. Otherwise, why bother? If I write a simple linked stack, I'm not going to waste my time with the extra pointer because it's not necessary. But if I'm writing a simple linked deque, double linking makes sense.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

Re: qustion about the double link list

 
0
  #3
Mar 15th, 2006
thanks narue you mean that in stack we prefer to use the single
but in the qeue we use the double
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,681
Reputation: Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all 
Solved Threads: 264
Lerner Lerner is offline Offline
Posting Virtuoso

Re: qustion about the double link list

 
0
  #4
Mar 15th, 2006
A singly linked list can be used to create a stack, but so could a doubly linked. It depends what you are most comfortable with.

A queue and a deque are different containers. A queue removes the first item pushed on the queue, whereas a deque can remove either the first or the last item pushed onto the deque. Again a singly linked list or a doubly linked list could be used with either container. It depends on how comfortable you are using one or the other. I can't think of any manipulation of data you can do with a singly linked list you can't do with a doubly linked or visa versa. It's ease of the manipulation and ease of implementation that counts. If you are familiar with doubly linked lists, then some process are easier to implement using that container than singly linked, but the syntax of working with doubly linked lists is a little trickier to work with than singly, so if you are familiar and comfortable with singly linked use it. However, you will want to become familiar with doubly linked because it can make your life easier under some circumstances.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 129
Reputation: some one is an unknown quantity at this point 
Solved Threads: 0
some one some one is offline Offline
Junior Poster

Re: qustion about the double link list

 
0
  #5
Mar 16th, 2006
thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC