Recognize CHT when:
Your DP has where , , depend only on their argument.
The cost "mixes" and through a product term. Look for terms like in the recurrence.
You can rewrite as . Then check: Slopes monotonic? Use deque for inserts. Queries monotonic? Use deque for queries. Neither sorted? Use Li Chao tree instead.