Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.23 KB

README.md

File metadata and controls

24 lines (16 loc) · 1.23 KB

dllist

Double linked list implemented in pure C.

Design choises for this implementation:

  1. The list and the structural element in the list and the list is the same data type.
  2. The list (or the head of the list) is part in the list to make implementation of insert and delete smart.
  3. The list is not responsible for deleting the elements in the list. So on deletion a function that destroys the actual element is needed.
  4. The data type stored in the list is a pointer to a void.
  5. The namespace for the list interface is _dllist appended to each function.

Double linked list in pretty pictures

The data type looks like this:

alt text

And the Empty List:

alt text

A List with three elements look like this:

alt text

Read more on the wiki