4.3 Linked lists

A linked list consists of individual objects that point to each other. Figure 1 is a pictorial representation of of how a linked list represents $(a, b, c)$ .

Figure 1: A pictorial representation of the list $(a, b, c)$ using a linked list
\includegraphics{abclist} .

In this representation, each rectangle in the figure is an object that is dynamically allocated from memory. Each object points to another one, except for the last one. The last object points to a ``ground'' symbol to mean that it is the last one.



Subsections

Copyright © 2006-09-27 by Tak Auyeung