Algorithm Deep Dive Computer Science

Basic Problems on Graph Data Structure

This section includes some of the basic examples and problems involving Graph Data structure.

Detect Cycles in a Graph

A cycle in a graph is a sequence of edges and vertices where you can start from a specific vertex, follow a continuous path, and return to the same vertex without repeating any edge. In simpler terms, a cycle occurs when you can start at a

Find Number of Islands in 2D Map

Finding Number of Islands is a common problem in computer science, where the task is to determine the number of distinct islands in a 2-dimensional grid. In this problem, the grid is represented as a 2D matrix, where each cell can have a