Given a grid of heights, return the minimum effort required to travel from the top-left cell to the bottom-right cell. The effort of a path is the maximum absolute difference between consecutive cells on that path.
{
"heights": [
[
1,
2,
2
],
[
3,
8,
2
],
[
5,
3,
5
]
]
}2{
"heights": [
[
1,
2,
3
],
[
3,
8,
4
],
[
5,
3,
5
]
]
}1{
"heights": [
[
1,
2,
1,
1,
1
],
[
1,
2,
1,
2,
1
],
[
1,
2,
1,
2,
1
],
[
1,
2,
1,
2,
1
],
[
1,
1,
1,
2,
1
]
]
}0Sign in to Run Code and Submit