adaptatron's blog

By adaptatron, 98 minutes ago, In English

Given an array, split it into $$$k$$$ disjoint consecutive blocks such that the value of $$$\sum a[i] \cdot blockIndex[i]$$$ is maximized.

I created a video discussing why the greedy strategy for this problem is not obvious. Here is the practice problem

https://youtu.be/y_lk5x4ZRNI

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