Company: Amazon_7oct
Difficulty: medium
Find Minimum Sum Problem Description AWS provides scalable systems. A set of n servers are used for horizontally scaling an application. The goal is to have the computational power of the servers in non-decreasing order. To do so, you can increase the computational power of each server in any contiguous segment by x . Choose the values of x such that after the computational powers are in non-decreasing order, the sum of the x values is minimum. Complete the function findMinimumSum in the editor below. The function findMinimumSum has the following parameter(s): int power[] : the computational powers of n different servers Returns: long : the minimum possible sum of integers required to make the array non-decreasing long findMinimumSum(int power_count, int* power) { } Examples Example 1: There are n = 5 servers and their computational power = [3, 4, 1, 6, 2] . Explanation: Add 3 units to the subarray (2,4) and 4 units to the subarray (4,4). The final arrangement of the servers is [3, 4,