Company: Amazon off campus sde1_24march
Difficulty: medium
Imagine you're a cloud services manager on Amazon Web Services, specializing in high-performance computing solutions. Each of your services is evaluated by clients based on its reliability and throughput capacity. The overall performanceScore of your services is determined by the maximum possible sum of consecutive metrics. To improve the performanceScore of your services and attract more enterprise clients, you are given an integer scaleFactor and the following two strategies: Boost Metrics: Select a contiguous segment of metrics and boost them by multiplying each metric in that range by scaleFactor . Normalize Metrics: Select a contiguous segment of metrics and normalize them by dividing each metric in that range by scaleFactor . Your task is to determine the maximum possible performanceScore for your computing services after applying exactly one of these strategies. Note: When applying the second strategy i.e., Normalize Metrics : For dividing positive metrics, use the floor value o