I dont understand the question and testcase…plz explain
I dont understand the question and testcase..plz explain
@garganshul151,
You just have to divide the array in 2 equal parts s.t the sum of corresponding differences of 2 halves are maximum and minimum respectively. For e.g:
Input
1
4
12 -3 10 0
Output
5 25
Explanation
For max,A={12,10},B={-3,0}, max= (12-(-3))+(10-0)=25
For min,A={12,-3},B={10,0}min=(12-10)+|(-3-0)|=5