Back to course home
0% completed
Path With Minimum Effort (medium)
Problem Statement
Imagine you're on a grid of size n x n, where each point has an elevation. Your task is to find a path from the top-left corner to the bottom-right corner that minimizes the effort required to travel between consecutive points, where effort is defined as the absolute difference in elevations between two points. Your goal is to determine the smallest maximum effort required for any path from the first point to the last.
Example Generation
Example 1:
- Input:
[[1,2,3],[3,8,4],[5,3,5]]
- Expected Output:
1
.....
.....
.....
Like the course? Get enrolled and start learning!