Ask Question
Today, 08:32

The following is the pseudocode for which type of algorithm?

For start = each array subscript, from the first to the next-to-last

minIndex = start

minValue = array[start]

For index = start + 1 To size - 1

If array[index] < minValue

minValue = array[index]

minIndex = index

End If

End For

swap array[minIndex] with array[start]

End For

(A) Bubble sort

(B) Binary sort

(C) Bubble search

(D) Selection sort

(E) None of those

+3
Answers (1)
  1. Today, 11:51
    0
    Answer: Selection sort

    Explanation:

    In selection sort for ascending sort it repeatedly goes through the list to find the minimum element and puts it in among the sorted elements.

    here we are taking the first value of the array as the minimum value and we repeatedly go through the array to compare it with all the elements present in the array. When we find the smallest element it place it in the 0 index position and then continue our search from the index position 1 and continue so on till the list is sorted.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The following is the pseudocode for which type of algorithm? For start = each array subscript, from the first to the next-to-last minIndex ...” 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