• graph traversal
    • BFS: start with given node; visit node popped from queue, add unvisited nodes to queue, repeat until nodes exhausted
    • DFS: start from any node; for each unvisited node, DFS-visit all unvisited neighbors
    • time complexity for both BFS & DFS: if adjacency list, if adjacency matrix
  • graph single-source shortest path (shortest destination)
    • Bellman-Ford algorithm: for times: loop over all edges and try to update and ; do a final iteration to check if there is a negative-weight cycle
      • time complexity:
    • Dijkstra’s algorithm: initialize min priority queue keyed by ; pop a node , for each directed edge , try to update the neighbor ‘s distance
      • time complexity: w/o priority queue or with priority queue)
  • find minimum spanning tree for an undirected graph