OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.52k stars 3.66k forks source link

Number of Islands _ DFS.cpp #6740

Open RuchNas-Pottah opened 8 months ago

RuchNas-Pottah commented 8 months ago

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.

RuchNas-Pottah commented 8 months ago

Sir, I have updated the code with an explanation of the sample input.

RuchNas-Pottah commented 8 months ago

Include the complete code with main() function which one can run on terminal.

Sir, I have updated the complete code with the main() function that runs in the terminal.

RuchNas-Pottah commented 8 months ago

@AdiChat Sir please review my updated pull request