NeetCode #564LC-2658MediumGraphs
← Back to All Problems

#564 · #2658 · Maximum Number of Fish in a Grid(网格图中鱼的最大数目)

📌 Problem Statement & Constraints

You are given an m x n grid where 0 is water and a positive value is the number of fish in that water cell. A fisherman can start at any water cell and move to 4-directionally adjacent water cells. Return the maximum number of fish they can catch. Constraints: 1 <= m, n <= 10, 0 <= grid[i][j] <= 10.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!