8.3. The Graph Abstract Data Type

The graph abstract data type (ADT) is defined as follows:

Beginning with the formal definition for a graph there are several ways we can implement the graph ADT in Python. We will see that there are trade-offs in using different representations to implement the ADT described above. There are two well-known implementations of a graph, the adjacency matrix and the adjacency list. We will explain both of these options, and then implement one as a Python class.

You have attempted of activities on this page
Next Section - 8.4. An Adjacency Matrix