Solving Graph Problems — Number of Islands
Let’s solve the famous Number of Islands Problem and its various similar problems.
Hello everyone! I have now started writing articles related to some Data Structures and Algorithms, and I would be doing it topic wise. I have chosen to begin with Graphs since it is an important topic. This article will not be the only one in Graph related problems. I will be writing some more articles attributed to Graph coding problems, and this one is the first of them.
In the complete Graph series, I aim to cover all the significant algorithms related to graph coding problems which are:-
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Disjoint Set — Union Find
- Dijkstra’s Algorithm
So, in the first part, we would deal with all the Island counting related problems. I will be linking the problems with their Leetcode pages so that you can go and practice them there.
I will explain the problem and the solution approach and would also provide working code in C++ language.