Company: Amazon_7nov
Difficulty: medium
Maximum Performance Score Problem Description A cloud infrastructure provider runs large data centers spread across many regions, managing storage, compute capacity, and networking for its customers. Part of keeping things running well is tuning how distributed databases perform across server clusters. To speed up query handling, engineers split each database into small blocks of data. Those blocks are then organized into zones, and each query operation is handled by a fixed number of blocks within a zone. A zone's performance score comes from adding up its queryLimit most efficient queries. For instance, if a zone's blocks have performance values [3, 6, 1, 8] and queryLimit = 2 , that zone's performance score is 6 + 8 = 14 . Engineers need to split the data blocks into numZones consecutive, non-overlapping zones, with every zone containing at least queryLimit blocks. The system's overall performance is the sum of the performance scores across all numZones zones. Given an array blocks