468,554 Members | 1,889 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

how to create a doubly liked list???

I want to ask what's the differences between doubly liked list and linear
liked list, and also the circular doubly liked list in terms of
implementation. THX

Jul 23 '05 #1
3 1962
"surrealtrauma" <su***********@hotmail.com> wrote in message
news:7b******************************@localhost.ta lkaboutprogramming.com...
I want to ask what's the differences between doubly liked list and linear
liked list, and also the circular doubly liked list in terms of
implementation. THX

In C++ you create a doubly linked list by using std::list
in the standard library.
Other than that, your question is not about C++, and does
not belong in this newsgroup (try comp.programming).

This said:
In a doubly linked list, each list entry stores a pointer
to both the next and the previous item. A single-linked
list only stores a pointer to the next item.

"Linear" linked list doesn't mean much too me, except
when opposed to more general graph structures (e.g. trees).

A circular linked list is a list where the 'next' pointer
of the last item points to the first item (and reciproqually
for the 'prev' pointer of the first item).
hth-Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Jul 23 '05 #2
sam
Ivan Vecerina wrote:
"surrealtrauma" <su***********@hotmail.com> wrote in message
news:7b******************************@localhost.ta lkaboutprogramming.com...
I want to ask what's the differences between doubly liked list and linear
liked list, and also the circular doubly liked list in terms of
implementation. THX
In C++ you create a doubly linked list by using std::list
in the standard library.
Other than that, your question is not about C++, and does
not belong in this newsgroup (try comp.programming).

This said:
In a doubly linked list, each list entry stores a pointer
to both the next and the previous item. A single-linked
list only stores a pointer to the next item.

"Linear" linked list doesn't mean much too me, except
when opposed to more general graph structures (e.g. trees).

A circular linked list is a list where the 'next' pointer
of the last item points to the first item (and reciproqually
for the 'prev' pointer of the first item).

This is a general C programming practice.
hth-Ivan

Jul 23 '05 #3
"surrealtrauma" writes:
I want to ask what's the differences between doubly liked list and linear
liked list, and also the circular doubly liked list in terms of
implementation. THX


This link should be helpful.

http://en.wikipedia.org/wiki/Linked_list
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by dssuresh6 | last post: by
5 posts views Thread by free2cric | last post: by
4 posts views Thread by sandeep | last post: by
5 posts views Thread by adam.kleinbaum | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.