views:

286

answers:

2

I'm looking for a good understandable example in c++ with differences. Does the header file <list.h> provide both or should I look somewhere else?

A: 

No, thats a double linked list

list containers are implemented as doubly-linked lists; Doubly linked lists can store each of the elements they contain in different and unrelated storage locations. The ordering is kept by the association to each element of a link to the element preceding it and a link to the element following it.

http://www.cplusplus.com/reference/stl/list/

Tom
+2  A: 

There is no <list.h>, but is a <list> and, I'm afraid, it's not the "education-purpose code". It's an STL implementation of the list which involves iterators and is written to grant maximum flexibility and speed.

You might want to see Wikipedia or Cormen's "Introduction to Algorithms" book for explanation, pseudocode and complexities.

Kotti