Edge List

Implementation

  • Represent as a table (array of objects) that stores every edge along with it’s associated weight
  • Space:

Operations

  • Connectedness
    • Is A connected to B?
    • Do a linear scan for (A, B)
    • time complexity
  • Adjacency
    • What are A’s adjacent nodes?
    • Do a linear scan for A on the left
    • time complexity

is problematic because in a dense graph