Ask Question
6 August, 09:00

Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the insertion sort algorithm as discussed in the book. What is the resulting list after two passes of the sorting phase; that is, after three iterations of the for loop? a. list = {10, 18, 20, 24, 75, 70, 60, 35}b. list = {10, 20, 24, 75, 70, 18, 60, 35}c. list = {10, 18, 20, 24, 35, 70, 60, 75}d. list = {10, 20, 20, 18, 35, 70, 60, 75}

+2
Answers (1)
  1. 6 August, 09:44
    0
    Option B

    10,20,24,75,70,18,60,35

    Explanation:

    The first, second and third iteration of the loop will be as follows

    insertion sort iteration 1: 20,24,10,75,70,18,60,35

    insertion sort iteration 2:10,20,24,75,70,18,60,35

    insertion sort iteration 3: 10,20,24,75,70,18,60,35
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the insertion sort algorithm as ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers