You are given an integer array nums and an integer k.
You need to partition nums into one or more non empty contiguous subarrays. The cost of a partition is defined as the sum of the importance values of each subarray in the partition.
The importance value of a subarray is
Return the minimum possible total cost to split nums.
Constraints:
nums.length
nums[i] nums.length
k
You are given an integer array nums and an integer k.
You need to partition nums into one or more non empty contiguous subarrays. The cost of a partition is defined as the sum of the importance values of each subarray in the partition.
The importance value of a subarray is
Return the minimum possible total cost to split nums.
Constraints:
nums.length
nums[i] nums.length
k