Quick Facts

  • Constructed from edges (nodes) and vertices that connect them.
  • Graph types include:
    • Directed or Undirected
    • Weighted or Unweighted
    • Connected or Disconnected
  • Represented in code as:
    • Adjacency List
    • Adjacency Matrix
    • Objects and Pointers
  • A tree is a graph, but a graph isn’t always a tree.

Graph Traversal

  • Depth First Search (DFS)
  • Breadth First Search (BFS)

Shortest Path

  • Dijkstra
  • A*

Graph Representation

Leave a Reply