When I’m trying to solve a problem that asks for optimization (Minimum, Maximum, Largest, or Smallest …) I trying to consider those algorithms and techniques:

  1. DP
  2. graph algorithm (BFS, Dijkstra, Min-Max flow, …)
  3. Binary Search (specially in problems contains min of maxs or max of mins)
  4. Data Structure (Monotonic stack, heap)
  5. 2 pointers
  6. sliding window
  7. Divide and conquer
  8. Greedy (last option)
  9. or some data structure that can make the brute force solution better

By practicing more questions I can easily eliminate most of them from first glance.