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
Number of Islands _ DFS.cpp #6740
base: master
Are you sure you want to change the base?
Conversation
This contains an accepted solution to the problem 'Number of Islands' on LeetCode, done with the help of the Depth-First-Search algorithm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Embed a sample input in the code or explain the input format in comments with examples.
Input format explained in the comments
Sir, I have updated the code with an explanation of the sample input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include the complete code with main() function which one can run on terminal.
Added main function and the whole program can be run in the terminal now.
Sir, I have updated the complete code with the main() function that runs in the terminal. |
@AdiChat Sir please review my updated pull request |
This contains an accepted solution to the problem 'Number of Islands' on LeetCode, done with the help of the Depth-First-Search algorithm.
Fixes issue:
Added a concise and easily understandable code for the problem.
Changes:
Made the code understandable, used DFS, and followed a proper breakdown of functions.