title: Given one can change the sign of numbers, find Minimum Sum of array
body: <p>I came across this question in a coding competition-</p>
  
  <p>You're given an array of positive integers and are allowed to change the sign of any of the integers whenever you require.
  Write a program to calculate the minimum sum of this array. This sum should be >= 0.
  For example :
  Array = {1,2,4,5} then sum = 0 as we change sign of 1 and 5 {-1,2,4,-5}</p>
  
  <p>My solution to the problem was to sort the array and find the sum of all the members. I would then iteratively decrease 2*(sorted array value)  from the sum-starting from the largest number - till sum becomes 0 or till it becomes negative. </p>
  
  <p>But my solution is wrong. Take 12,13,14,15,16,50. My code would change 50 to -50 and stop (i.e min sum = 20). But the answer should be 12,-13,-14,-15,-16,50 (min sum = 4)</p>