adaptatron's blog

By adaptatron, 4 hours ago, In English

You are given a string. In one operation, you can delete a contiguous substring of identical characters by paying some cost. What is the minimum cost to delete the entire string when:

  • Cost is 1 regardless of the substring length.
  • Cost is equal to the length of the substring.
  • Cost is equal to $$$len^2$$$.

I created a video discussing the ideas used in this problem.

  • Vote: I like it
  • 0
  • Vote: I do not like it