Ask Question
29 April, 11:30

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. 29 April, 11:57
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers