Problem Statement: A directed graph of V vertices and E edges is given in the form of an adjacency list

Continue reading# Category: Graph

## Course Schedule I and II | Pre-requisite Tasks | Topological Sort: G-24

Problem Statement I (Course Schedule): There are a total of n tasks you have to pick, labeled from 0 to

Continue reading## Word Ladder – I : G-29

Given are the two distinct words startWord and targetWord, and a list denoting wordList of unique words of equal lengths.

Continue reading## Detect a Cycle in Directed Graph | Topological Sort | Kahn’s Algorithm | G-23

Problem Statement: Given a Directed Graph with V vertices and E edges, check whether it contains any cycle or not.

Continue reading## Shortest Path in Undirected Graph with unit distance: G-28

Given an Undirected Graph having unit weight, find the shortest path from the source to all other nodes in this

Continue reading## Topological Sort Algorithm | DFS: G-21

Problem Statement: Given a Directed Acyclic Graph (DAG) with V vertices and E edges, Find any Topological Sorting of that

Continue reading## Kahn’s Algorithm | Topological Sort Algorithm | BFS: G-22

Problem Statement: Given a Directed Acyclic Graph (DAG) with V vertices and E edges, Find any Topological Sorting of that

Continue reading## Shortest Path in Directed Acyclic Graph Topological Sort: G-27

Given a DAG, find the shortest path from the source to all other nodes in this DAG. In this problem

Continue reading## Find Eventual Safe States – DFS: G-20

Problem Statement: A directed graph of V vertices and E edges is given in the form of an adjacency list

Continue reading## Detect cycle in a directed graph (using DFS) : G 19

Problem Statement: Given a directed graph with V vertices and E edges, check whether it contains any cycle or not.

Continue reading