Graph


  1. Bellman–Ford algorithm

    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.

  2. Dijkstra's algorithm

    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.

  3. Floyd Warshall algorithm

    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.

  4. Find shortest path in an unweighted graph

    Given list of edges, find shortest path from source node to destination node in an unweighted graph.