Learning objectives
The class slist |
Besides doubly linked lists of type
list, LEDA also offers singly linked lists. The
respective class is called slist. Here,
every container knows only its successor, but not its
predecessor. This implementation is particularly memory
efficient; in exchange, an slist can be
passed through only from the front to behind, but not
vice-versa. Figure 2.16 shows a
singly linked list.
The interface of slist is
fundamentally smaller than the one of
list. One should use this type only if
memory is scarce and if one must iterate only in one
direction.
More information about singly linked lists is found on the corresponding manual page.