#number-of-islands
Read more stories on Hashnode
Articles with this tag
To see the question, click here. Naive Approach 1 The idea is to use the DFS algorithm to explore the grid. Whenever it encounters a land cell ('1')...