An alternative to arrays, linked lists rely heavily on pointers and dynamically allocated memory. Unlike arrays, storage of linked lists need not be contiguous.
The idea: for each data item, store both the data and a pointer to the next data item (and the next pointer).
For the specification of the StringList class using linked lists, see string-list.h. For the implementation see string-list.C.
temp = new ListItem
    
 
temp->val = entry
    
 
A->next = C;      // A->next swings from B to C
C->prev = A;     
B->prev = C;      // B->prev swings from A to C
C->next = B;