O'Reilly logo
  • You Wang thinks this is interesting:

adjacency matrix. The main difference is the following: Instead of listing all neighbors for each node, we have a row (an array) with one position for each possible neighbor (that is, one for each node in the graph), and store a value, such as True or False, indicating whether that node is indeed a neighbor

From

Cover of Python Algorithms: Mastering Basic Algorithms in the Python Language, Second Edition

Note

adjacency matrix has a more unified structure