Ask 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 = 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

+1
Answers (1)
  1. 26 June, 09:13
    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 & Technology 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