Bellman-Ford can handle graphs with negative edge weights, unlike Dijkstra's algorithm. It has a time complexity of O(V * E), where V is the number of vertices and E is the number of edges.
Given an adjacency-list representation of a graph and a starting vertex, visit and print every reachable vertex in breadth-first order.
Given an adjacency-list representation of a graph and a starting vertex, visit and print every reachable vertex in depth-first order.
Given a weighted graph, a source and a destination vertices in the graph, find the shortest paths from the source to the destination vertices in the given graph.
Given a directed capacity graph, a source vertex, and a sink vertex, find the maximum flow from the source to the sink using breadth-first search to select augmenting paths.
Floyd-Warshall efficiently finds the shortest paths between all pairs of vertices in a graph. Handles graphs with negative edge weights, but it cannot detect negative cycles.
Given a directed capacity graph, a source vertex, and a sink vertex, find the maximum flow from the source to the sink.
Kruskal's minimum spanning tree
Given a weighted, undirected graph as an edge list and the number of vertices, find a minimum spanning tree without creating cycles.
Given a connected, weighted, undirected graph represented by an adjacency matrix, find a minimum spanning tree starting from vertex 0 and return its selected edges.
Find shortest path in an unweighted graph
Given list of edges, find shortest path from source node to destination node in an unweighted graph.