Consider an array of length 5, arr[5] = {9,7,4,2,1}. What are the steps of…

PYQ AMCAT 2024

Consider an array of length 5, arr[5] = {9,7,4,2,1}. What are the steps of insertions done while running insertion sort on the array?

  1. A.

    7 9 4 2 1 4 7 9 2 1 24 7 9 1 1 2 4 7 9

  2. B.

    9 7 4 1 2 9 7 1 2 9 1 2 4 7 1 2 4 7 9

  3. C.

    7 4 2 1 9 4 2 1 9 7 2 1 9 7 4 1 9 7 4 2

  4. D.

    7 9 4 2 1 2 4 7 9 1 4 7 9 2 1 1 2 4 7 9

Attempted by 337 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…