Ask Question
13 August, 13:07

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. 13 August, 13:21
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers