Can't get easier than that
IntuitionApproachComplexity
Time complexity:

Space complexity:
BFSDFS
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# BFS
```cpp []
class Solution {
public:
    int dfs(int r,int c,vector<vector<int>>& grid)
        {
            int rsize=grid.size(),csize=grid[0].size();
            if(r<0 || c<0 || r>=rsize || c>=csize || grid[r][c]==0)return 0;
            vector<pair<int,int>> directions = {{1,0},{0,1},{-1,0},{0,-1}};
            int maxhere=grid[r][c];
            grid[r][c]=0;
            for(auto [dr,dc] : directions)
            {
                maxhere += dfs(r+dr,c+dc,grid);
            }
            return maxhere;
        }

    int findMaxFish(vector<vector<int>>& grid) {
        int rsize=grid.size(),csize=grid[0].size();
        int maxfish=0;
        for(int i=0;i<rsize;i++)
        {
            for(int j=0;j<csize;j++)
            {
                if(grid[i][j]!=0)
                {
                    maxfish = max(maxfish, dfs(i,j,grid));
                }
            }
        }
        return maxfish;
    }
};
```
# DFS
```cpp []
class Solution {
public:
    int findMaxFish(vector<vector<int>>& grid) {
        int rsize = grid.size(), csize =  grid[0].size();
        vector<pair<int, int>> direction = {{1,0},{0,1},{-1,0},{0,-1}};
        vector<vector<bool>> visited(rsize, vector<bool>(csize,false));
        int maxfish=0;
        auto bfs = [&](int r,int c) -> int
        {
            queue<pair<int, int>> q;
            visited[r][c] = true;
            q.push({r,c});
            int maxHere=grid[r][c];
            while(!q.empty())
            {
                auto [Rpos,Cpos] = q.front();
                q.pop();
                for(auto [dr,dc] : direction)
                {
                    int curR=Rpos+dr,curC=Cpos+dc;
                    if(curR>=0 && curR<rsize && curC>=0 && curC<csize && !visited[curR][curC] && grid[curR][curC]!=0)
                    {
                        q.push({curR,curC});
                        visited[curR][curC]=true; 
                        maxHere+=grid[curR][curC];
                    }
                }
            }
            return maxHere;
        };
        for(int i=0; i<rsize; i++)
        {
            for(int j=0; j<csize; j++)
            {
                if(grid[i][j]!=0 && !visited[i][j])
                {
                    maxfish = max(maxfish, bfs(i,j));
                }
            }
        }
        return maxfish;
    }
};
```
['Depth-First Search', 'Breadth-First Search', 'Queue', 'C++']