Concepts2
⚙️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
🗂️Data StructureAdvanced
Suffix Array
A suffix array stores the starting indices of all suffixes of a string in lexicographic order.
#suffix array#lcp array#kasai algorithm+11