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

One of the most intuitive ways of implementing graphs is using adjacency lists. Basically, for each node, we can access a list (or set or other container or iterable) of its neighbors.


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


adjacency list: given a node, give a list of neighbors.