C++ Solution
Approach\n Describe your approach to solving the problem. \n    DFS 2D\n\n# Code\n\nclass Solution {\npublic:\n    vector<vector<int>> grids;\n    int n, m, cnt
# Approach\n<!-- Describe your approach to solving the problem. -->\n    DFS 2D\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> grids;\n    int n, m, cnt, vis[11][11];\n    \n    bool valid(int x, int y) {\n        if(x >= 0 and x < n and y >= 0 and y < m and !vis[x][y] and grids[x][y]) return true;\n        else return false;\n    }\n    \n    void dfs(int x, int y) {\n        if(valid(x, y)) {\n            vis[x][y] = 1;\n            cnt += grids[x][y];\n            dfs(x, y+1);\n            dfs(x, y-1);\n            dfs(x+1, y);\n            dfs(x-1, y);\n        }\n    }\n    \n    int findMaxFish(vector<vector<int>>& grid) {\n        n = grid.size();\n        m = grid[0].size();\n        grids = grid;\n        int ans = 0;\n        for(int i = 0; i < n; i++) {\n            for(int j = 0; j < m; j++) {\n                if(!vis[i][j] and grid[i][j]) {\n                    cnt = 0;\n                    dfs(i, j);\n                    ans = max(ans, cnt);\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']