Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Triangle
Bookmark
Input
Example 1
Example 2
Example 3
Custom
triangle
=
[[2],[3,4],[6,5,7],[4,1,8,3]]
rows =
4
2
3
4
6
5
7
4
1
8
3
0
1
2
3
step down to an adjacent cell each row; build cheapest totals bottom-up
algo
master
.
io
Step:
Walk top to bottom, each step moves to an adjacent cell below. Build the cheapest totals from the bottom up
0 / 14
Input
Example 1
Example 2
Example 3
Custom
triangle
=
[[2],[3,4],[6,5,7],[4,1,8,3]]
0 / 14
rows =
4
2
3
4
6
5
7
4
1
8
3
0
1
2
3
step down to an adjacent cell each row; build cheapest totals bottom-up
algo
master
.
io
Step:
Walk top to bottom, each step moves to an adjacent cell below. Build the cheapest totals from the bottom up