Giter Club home page Giter Club logo

Comments (6)

bhalerao-2002 avatar bhalerao-2002 commented on July 3, 2024

Hello @nizar787 , I can add that solution, Assign me this issue under hacktoberfest

from hacktoberfest.

sajithsojan avatar sajithsojan commented on July 3, 2024

please review my code

from hacktoberfest.

alipsa2000 avatar alipsa2000 commented on July 3, 2024

This is the code can you please review this code
#include
#include
using namespace std;
class Solution {
public:
int numIslands(vector<vector>& grid) {
if (grid.empty() || grid[0].empty()) {
return 0;
}
int numIslands = 0;
int m = grid.size();
int n = grid[0].size();
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
if (grid[i][j] == '1') {
numIslands++;
dfs(grid, i, j);
}
}
}
return numIslands;
}
private:
void dfs(vector<vector>& grid, int i, int j) {
if (i < 0 || i >= grid.size() || j < 0 || j >= grid[0].size() || grid[i][j] != '1') {
return;
}
grid[i][j] = '0';
dfs(grid, i - 1, j);
dfs(grid, i + 1, j);
dfs(grid, i, j - 1);
dfs(grid, i, j + 1);
}
};

from hacktoberfest.

PRITISH212121 avatar PRITISH212121 commented on July 3, 2024

i have solved this problem before,i m attaching my leetcode profile,please assign it to me
https://leetcode.com/pritishyo10/

from hacktoberfest.

navya975 avatar navya975 commented on July 3, 2024

I have solved this problem before,I am attaching my leetcode profile,please assign it to me
https://leetcode.com/navya975/

from hacktoberfest.

mrinalproxy avatar mrinalproxy commented on July 3, 2024

assigned this problem to me

from hacktoberfest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.