Problem 188 · Hard
Generalize two-transaction DP to k transactions, collapsing to O(n) when k exceeds n/2.
Open the interactive visualisation