Master Mathematics.

Programming · Searching, Sorting & Complexity · Problem 5

Two swaps in insertion sort

Insertion sort is applied to the array and takes exactly two swaps to sort it. Select all possible values of .

  1. (A)
  2. (B)
  3. (C)
  4. (D)

Source: GATE DA