Adjacency list

For a graph (that can be a directed graph or undirected graph) the adjacency list format is a list of neighbourhoods for .

  • This takes up space as you need to store the vertices and lists of edges taking up space.
  • To check if two vertices are connected takes time.
  • Finding neighbours takes .