Swift💯DFS
DFS Flood Fill (accepted answer)
**DFS Flood Fill (accepted answer)**
```
class Solution {
  func findMaxFish(_ grid: consuming [[Int]]) -> Int {
    let (rows,cols) = (grid.indices, grid[0].indices)
    func dfs(_ x:Int, _ y:Int) -> Int {
      guard rows ~= y, cols ~= x, grid[y][x] > 0 else { return 0 }
      var fish = grid[y][x]
      grid[y][x] = 0
      for (dx,dy) in [0,1,0,-1,0].adjacentPairs() {
        fish += dfs(x+dx, y+dy)
      }
      return fish
    }
    return product(cols, rows).lazy.map(dfs).reduce(0, max)
  }
}
```
['Depth-First Search', 'Recursion', 'Swift']