Minimum Array Reduction
Given some array, find the minimum possible reduction/cost.
Your process must go as follows:
Remove any two elements that are different (index-wise)
Add the sum of these elements as a new element into the array
Your total cost will be the total sum of these elements in the previous step.
Continue this process until you are unable to remove 2 elements.
Last updated