Partition Array for Maximum Sum
Split an array into contiguous blocks of at most k elements, replace each block by its maximum, and maximize the total. A dynamic table records the best total for each prefix length.
Split an array into contiguous blocks of at most k elements, replace each block by its maximum, and maximize the total. A dynamic table records the best total for each prefix length.