An inversion in an array A[] is a pair (A[i], A[j]) such that A[i]>A[j] and i<j. An array will have maximum number of inversions if it is-

An inversion in an array A[] is a pair (A[i], A[j]) such that A[i]>A[j] and i<j. An array will have maximum number of inversions if it is-

  1. a) Sorted in increasing order
  2. b) Sorted in decreasing order
  3. c) Sorted in alternate fashion
  4. d) Both A and B

From the Combined Bank Assistant Programmer (CSE) March 2021 – Preliminary exam, question 21 of 86.

More from this paper