Concepts3
⚙️AlgorithmAdvanced
Convex Hull Trick - Dynamic (LineContainer)
Dynamic Convex Hull Trick (LineContainer) maintains the lower or upper envelope of lines y = m x + b with O(log n) insertion and O(log n) query for arbitrary insertion order.
#convex hull trick#dynamic cht#linecontainer+12
⚙️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
Li Chao Tree
A Li Chao tree maintains a set of lines y = m x + b and answers minimum (or maximum) value queries at a given x in O(log C) time, where C is the numeric range of x.
#li chao tree#dynamic convex hull#segment tree lines+12