Ask Question
5 September, 21:42

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

+4
Answers (1)
  1. 5 September, 21:51
    0
    list = {10, 18, 24, 75, 70, 20, 60, 35}

    Explanation:

    Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.
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 selection sort algorithm as ...” in 📘 Computers and Technology 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