Find the minimal absolute value of a sum of two elements.
A[0] = -8 A[1] = 4 A[2] = 5 A[3] =-10 A[4] = 3
the function should return |(−8) + 5| = 3.
Assume that:
- N is an integer within the range [1..100,000];
- each element of array A is an integer within the range [−1,000,000,000..1,000,000,000].
Complexity:
- expected worst-case time complexity is O(N*log(N));
- expected worst-case space complexity is O(1), beyond input storage (not counting the storage required for input arguments).