1905 Count Sub Islands
Techniques Used
Graph Matrix
Simple DFS
Approach
For each element in the grid,
if it has not been visited yet, and is not 0
we perform dfs for that element
we maintain a flag that will be changed to 1 if the corresponding element in grid1 is not...
raahulsaxena.hashnode.dev2 min read