IBM | OA 2024 | Maximize Positive Prefix Sums
Anonymous User
273
Sep 14, 2024
Given an array of integers, return the maximum number of positive prefix sums that can be achieved by permuting the array. In other words, consider all permutations of the array, compute the prefix sums for each permutation and return the maximum number of positive prefix sums possible.
Example Testcase: [1,2,3,-2]
Expected Output: 4
Comments (1)


