Problem Statement: Given a DAG( Directed Acyclic Graph ), print all the vertex of the graph in a topologically sorted
Continue readingCategory: 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 readingBellman-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 readingMinimum 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 readingMinimum 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 readingBipartite 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 readingKosaraju’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 readingTopological Sort (BFS)
Problem statement: Given a graph, find the topological order for the given graph. Topological sort: The linear ordering of nodes/vertices
Continue readingDetect 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 readingDepth 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