Concepts2
⚙️AlgorithmAdvanced
Divide and Conquer DP Optimization
Divide and Conquer DP optimization speeds up DP transitions of the form dp[i][j] = min over k of dp[i-1][k] + C(k, j) when the optimal k is monotone in j.
#divide and conquer dp#monge array#quadrangle inequality+10
⚙️AlgorithmAdvanced
Convex Hull Trick (CHT)
The Convex Hull Trick (CHT) speeds up dynamic programs where each state is a minimum over linear functions, such as dp[i] = min_j (dp[j] + b[j] × a[i]).
#convex hull trick#cht#dynamic programming optimization+12