2-4 Inversions Let A[l : n] be an array of n distinct numbers. If i < j and A[i] > A[il, then the pair (i, j) is called an inversion of A.
a. List the five inversions of the array (2,3, 8,6, 1).
d. Give an algorithm that determines the number of inversions in any permutation on n elements in O(n lg n) worst-case time. (Hint: Modify merge sort.)