CHT optimizes DP with linear cost functions. But some DPs have range constraints: must be within a sliding window of . Monotonic Queue improvement handles . The valid range slides with .
Instead of a hull of lines, we maintain a deque of values. The front is always the best in the current window. Both are deque-based optimizations, but for different DP structures. Learn both to cover more problem types.