Singly linked lists

A singly linked list is one where each element points forwards to the next element.

Unlike a doubly linked list, elements do not point back to the previous element. The list has an anchor point which points forwards to the first element and also has a pointer to the last element.

Anchor points are always referred to as headers.

A singly linked list is useful for maintaining a non-circular queue of items; for example, a stack.

Figure 1. Singly linked list

Singly linked lists involve the creation and use of the classes:

  • TSglQueLink

  • TSglQue<class T>

  • TSglQueIter<class T

In practice, these classes are almost always used as components of other classes.