5.1 DP Strategies

  • Range DP
    • minimum cost to make substring a palindrom
    • Usually
  • All-possible-splits DP
    • Matrix chain mult.:
    • Try all possible splits and chose cheapest one
  • Sliding window
    • Idea: Extend window until no more possible. Then either reset window or pull from left.
  • Prefix sum
    • Precompute the sum up until element
    • Return