Your question is Minimum Effort Grid Path. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a grid of heights, return the minimum possible effort needed to move from the top-left cell to the bottom-right cell. The effort of a path is the maximum absolute difference between adjacent cells along that path, and movement is allowed in four directions.
1 <= m, n <= 1001 <= heights[i][j] <= 10^6