Graph

three basic ways to represent a graph in memory

https://dzone.com/articles/algorithm-week-graphs-and

  • 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>