Company: Amazon_5nov
Difficulty: medium
Maximum Performance Score Problem Description Amazon Web Services (AWS) operates vast data centers around the globe, managing cloud storage, computing power, and networking infrastructure. One key responsibility is optimizing the performance of distributed databases across various server clusters. To ensure the efficiency of database queries, AWS engineers segment each database into blocks of data. These blocks are then grouped into zones, where a specific number of blocks are handled per query operation. The performance score of a zone is determined by summing the top queryLimit most optimized queries from that zone. For example, if the performance values of the blocks in a zone are [3,6,1,8] and queryLimit=2 , the performance score of that zone is 6+8=14 . Engineers must divide the data blocks into numZones consecutive non-overlapping zones, ensuring that each zone handles at least queryLimit data blocks. The total system performance is the sum of the performance scores of all numZon