The size of array = n.
If the number of negative values = number of positive values, then number of exchange required = n/2.
In worst case, there must exist a positive value and (n-1) negative number. (If all numbers are negative then sorting is not mandatory). Hence the number of exchange required = (n-1)l