> For the complete documentation index, see [llms.txt](https://jaywin.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jaywin.gitbook.io/leetcode/solutions/1102-path-with-maximum-minimum-value.md).

# 1102. Path With Maximum Minimum Value

<https://leetcode.com/problems/path-with-maximum-minimum-value>

## Description

Given an `m x n` integer matrix `grid`, return *the maximum **score** of a path starting at* `(0, 0)` *and ending at* `(m - 1, n - 1)` moving in the 4 cardinal directions.

The **score** of a path is the minimum value in that path.

* For example, the score of the path `8 → 4 → 5 → 9` is `4`.

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/08/05/maxgrid1.jpg)

```
**Input:** grid = [[5,4,5],[1,2,6],[7,4,6]]
**Output:** 4
**Explanation:** The path with the maximum score is highlighted in yellow. 
```

**Example 2:**

![](https://assets.leetcode.com/uploads/2021/08/05/maxgrid2.jpg)

```
**Input:** grid = [[2,2,1,2,2,2],[1,2,2,2,1,2]]
**Output:** 2
```

**Example 3:**

![](https://assets.leetcode.com/uploads/2021/08/05/maxgrid3.jpg)

```
**Input:** grid = [[3,4,6,3,4],[0,2,1,1,7],[8,8,3,2,7],[3,2,4,9,8],[4,1,2,0,0],[4,6,5,4,3]]
**Output:** 3
```

**Constraints:**

* `m == grid.length`
* `n == grid[i].length`
* `1 <= m, n <= 100`
* `0 <= grid[i][j] <= 109`

## ac

```java
```
