• Teaser Home

    Clean Code Developer School

    Saubere Softwareentwicklung üben – regelmäßig, fokussiert, individuell, angeleitet

Linked List

Class Kata „Linked List“

Implement the abstract data type list as a linked list. The class LinkedList<T> has to implement the interface IList<T>.

A linked list consists of elements that have a value (called Item) and a reference to the next element in the list (called Next):

The list is internally built from these elements. But the public API does not show anything of this implementation details. The LinkedList<T> behaves as other classes the implement the interface IList<T>:

Variation

The list may be double linked. In addition to the Next property each element has a Prev property that references the previous element in the list. This fastens the reverse traversal of the list from the last element backwards tot he first.