Problem Statement: Given a DAG( Directed Acyclic Graph ), print all the vertex of the graph in a topologically sorted

Continue reading# Category: Graph

## Dijkstra’s Algorithm – Shortest distance

Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges, Find the shortest distance of all

Continue reading## Bellman-Ford Algorithm – Shortest Distance with Negative Edge

Problem Statement: Given a weighted directed graph with negative edge weights with n nodes and m edges. Nodes are labeled from

Continue reading## Minimum Spanning Tree – MST using Prim’s Algo

Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges. The task is to find the

Continue reading## Minimum Spanning Tree – MST using Kruskal’s Algo

Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges. The task is to find

Continue reading## Bipartite Check using DFS – If Graph is Bipartite

Problem Statement: Given is a 2D adjacency list representation of a graph. Check whether the graph is Bipartite graph. (Note:

Continue reading## Kosaraju’s Algorithm for Strongly Connected Components(SCC)

Problem Statement: Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Find the number

Continue reading## Topological Sort (BFS)

Problem statement: Given a graph, find the topological order for the given graph. Topological sort: The linear ordering of nodes/vertices

Continue reading## Detect a cycle in Undirected Graph : Breadth-First Search

Problem Statement: Given an undirected Graph, check for a cycle using BFS (Breadth-First Search) Traversal. Example: Input: Output: Yes Explanation:

Continue reading## Depth First Search (DFS) traversal : Graph

Problem Statement: Given a graph, traverse through all the nodes in the graph using Depth First Search. Example: Input: Output:

Continue reading