I came through a question in which all the numbers in an array were supposed to be made equal minimising the total cost of operations.
a) Increase a number by 1, costs A.
b) Decrease a number by 1, costs B.
c) simultaneously decrease a number by 1 and increase another number by 1, costs C.
1<=A, B, C<=10000
What is the approach to solve this problem?