DSAverse
Dynamic Programming
Loading Dynamic Programming...
DP Table Filling
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
subproblems
O(2^n)→O(n)
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Dynamic Programming
Loading Dynamic Programming...
DP Table Filling
Find the optimal parenthesization to minimize scalar multiplications. Watch the DP table fill diagonally as subproblems of increasing chain length are solved.
Click Play to begin.
O(n³)O(n²)Question 1 of 3
Why does MCM fill the DP table diagonally?