Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Minimum Path Sum
Bookmark
Input
Example 1
Example 2
Example 3
Example 4
Custom
grid
=
[[1,3,1],[1,5,1],[4,2,1]]
grid =
3x3
start
end
1
3
1
1
5
1
4
2
1
every step costs its cell; find the cheapest right/down route
algo
master
.
io
Step:
Every cell has a cost. Find the cheapest top-left to bottom-right route, moving only right or down
0 / 12
Input
Example 1
Example 2
Example 3
Example 4
Custom
grid
=
[[1,3,1],[1,5,1],[4,2,1]]
0 / 12
grid =
3x3
start
end
1
3
1
1
5
1
4
2
1
every step costs its cell; find the cheapest right/down route
algo
master
.
io
Step:
Every cell has a cost. Find the cheapest top-left to bottom-right route, moving only right or down