When NOT to Use

Avoid forcing this pattern

Avoid forcing this pattern when:

  • Greedy choice property exists: If locally optimal choices lead to global optimum, greedy is simpler. Verify with counterexamples.
  • No overlapping subproblems: If each subproblem is solved only once, memoization adds overhead without benefit.
  • State space is too large: If states can't fit in memory, consider space optimization or different approaches. Remember: forcing a pattern where it doesn't fit leads to overcomplicated solutions.

If you find yourself fighting the approach, step back and reconsider whether another technique works better.