Company: Experian_1july
Difficulty: medium
Minimize the Difference Problem Description You are given an array A having N integers, such that N is always an even integer. You divide the array into two arrays of the same length. Additionally, each array element goes to exactly one of the new arrays. Find the maximum difference between the sum of both the new arrays. Note: It is given that 1-based indexing is used in all arrays. Complete the maxDifference function in the editor below. It has the following parameter(s): Name Type Description N INTEGER The number of integers. A INTEGER ARRAY The array A described in the problem. The function must return an INTEGER denoting the maximum difference between the sum of both the new arrays. Constraints 1 ≤ N ≤ 10^5 0 ≤ A[i] ≤ 10^4 Input format for debugging The first line contains an integer, N, denoting the number of elements in A. Each line i of the N subsequent lines (where 0 < i ≤ N) contains an integer describing A[i]. Examples Example 1: Input: 2 3 4 Output: 1 Expl