Hard Disk Clustering Cost (Min and Max)
A computer's hard disk has n sectors, where the size stored in the i-th sector is sectorCost[i] (1 ≤ i ≤ n). The disk must be divided into exactly clusterCount contiguous clusters: sectorCost[1..x1], ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
