Algorithm · Cisco · Easy
Requirements The first input line provides inputSize, which specifies the array length. The second line supplies inputSize integers separated by spaces as inputArr. A single move can exchange the values stored at any pair of positions. Determine the fewest exchanges needed to place every even value first and every odd value afterward. Values within the even portion and within the odd portion may appear in any order. Displayed limits are: 2 <= inputSize <= 10^5, 1 <=…
Checking your access…