This is a verified interview question from Amazon. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Find Minimum Sum" covers key patterns like Arrays.
"### Problem Complete the function findMinimumSum in the editor below. findMinimumSum has the following parameter(s): int power[n]: the computational powers of n different servers Returns int: the minimum possible sum of integers required to make the array non-decreasing ### Input Format For Custom Testing ### Sample Case 0 Sample Input For Custom Testing STDIN FUNCTION 3 → power[] size n = 3 2 → power = [3, 2, 1] 1 Sample Output 2 Explanation Add 1 unit to subarray (1,2) and 1 unit to subarray (2, 2). The final arrangement of servers is [3, 3, 3]."
Join thousands of developers practicing for Amazon.