Ask Question
11 October, 19:15

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

+5
Answers (1)
  1. 11 October, 21:09
    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?
Get 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 & Technology 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