Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DFS "Islands" problem solution in CPP #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paritoshM9
Copy link
Contributor

@paritoshM9 paritoshM9 commented Oct 23, 2019

Description

Added DFS Islands problem along with solution in CPP


void dfs(int curr, int* visited, int** adj_matrix, int n){
visited[curr] = 1;
for(int i = 0; i<n ; i++){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexing should be done as :
for(int row = 0; row <= adj_matrix.size(); ++row)
with more meaningful variable names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants