## Connected Components in an undirected graph

Given an undirected graph, print all connected components line by line. For example consider the following graph. We strongly recommend to minimize your browser and… Read More »

- Detect Cycle in a Directed Graph using BFS
- Minimum steps to reach any of the boundary edges of a matrix | Set-2
- Minimum number of given operations required to make two strings equal
- Find the ordering of tasks from given dependencies
- Edge Coloring of a Graph
- Find whether it is possible to finish all tasks or not from given dependencies
- Print all the levels with odd and even number of nodes in it | Set-2
- Finding the path from one vertex to rest using BFS
- Minimum distance to the corner of a grid from source
- Print the lexicographically smallest BFS of the graph starting from 1
- Islands in a graph using BFS
- Iterative approach to check for children sum property in a Binary Tree

Given an undirected graph, print all connected components line by line. For example consider the following graph. We strongly recommend to minimize your browser and… Read More »

We have earlier discussed Breadth First Traversal Algorithm for Graphs. We have also discussed Applications of Depth First Traversal. In this article, applications of Breadth… Read More »

Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print… Read More »

Write a function that returns true if a given undirected graph is tree and false otherwise. For example, the following graph is a tree. But… Read More »

Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from source or 1st… Read More »

. Given an undirected graph, how to check if there is a cycle in the graph? For example, the following graph has a cycle 1-0-2-1.… Read More »

Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if there is a path… Read More »

A vertex in an undirected connected graph is an articulation point (or cut vertex) iff removing it (and edges through it) disconnects the graph. Articulation… Read More »

A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either… Read More »

Given a Directed Graph and two vertices in it, check whether there is a path from the first given vertex to second. For example, in… Read More »

Breadth First Traversal (or Search) for a graph is similar to Breadth First Traversal of a tree (See method 2 of this post). The only… Read More »