inputSize, which specifies the array length.inputSize integers separated by spaces as inputArr.2 <= inputSize <= 10^5, 1 <= inputArr[i] <= 10^9.Input:
4
8 7 2 9
Output:
1
Explanation: exchanging 7 with 2 produces a valid arrangement; for example, [8,2,7,9] and [2,8,9,7] both satisfy the required split.
inputSize = 4 inputArr = 8 7 2 9
1
We start with the array [8, 7, 2, 9].
inputSize = 4 inputArr = 8 7 2 9
1
We start with the array [8, 7, 2, 9].