## Number of Islands

Problem Statement: Given a grid of size NxM (N is the number of rows and M is the number of

## Depth First Search (DFS)

Problem Statement: Given an undirected graph, return a vector of all nodes by traversing the graph using depth-first search (DFS).

## Breadth First Search (BFS): Level Order Traversal

Problem Statement: Given an undirected graph, return a vector of all nodes by traversing the graph using breadth-first search (BFS).

## Connected Components in Graphs

So far we’ve seen different types of graphs. Graphs can be connected or can be like a binary tree (as

## Graph Representation in C++

In this article, we are going to study the different ways of representing a graph in memory, but before that

## Introduction to Graph

What is a graph data structure? There are two types of data structures Linear Non – linear We are aware

## Topological Sort Using DFS

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

## 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