three basic ways to represent a graph in memory

  • objects and pointers
    • used more in OO situations
    • edge objects and vertex objects
  • matrix
    • can be sparse, where the key is the two vertices and the value says if/how its connected or info about the edge
  • adjacency list
    • HashMap<Vertex, List>