a. (1,5), (2,5), (3,4), (3,5), (4,5)
b. If the array is in nonincreasing order, then the number inversion are n(n-1)/2
c. Each element movement can decrease one inversion.
d. The same as merge sort. Suppose that we have two sorted array’s inversion numbers, let the array be L and R. Then what are the number of inversions between R and L. If R[j] <L[i], then R[j] incurs |L| – i + 1 inversions. We can count the inversion in the merge phase.