how to create a doubly liked list???

S

surrealtrauma

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
 
I

Ivan Vecerina

surrealtrauma said:
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
 
S

sam

Ivan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top