0How many inversions (pairs i < j with a[i] > a[j]) does the array 8, 4, 2, 1, 9, 3, 7 contain?A9B10C13D11 Correct answer: D ExplanationCounting greater elements to the right: 8→5 (4,2,1,3,7), 4→3 (2,1,3), 2→1 (1), 9→2 (3,7) = 11. Join the discussion Report an error Share