If the list [8,1,4,2,10,0] is sorted with the selection sort algorithm, what is the list at the 4th step of the algorithm?

A. [0,1,4,2,10,8]
B. [0,1,2,4,10,8]
C. [0,1,2,8,10,4]
D. [0,1,2,4,8,10]

Respuesta :

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The selection sort algorithm step started from 0, and continue till the sorting is done.

The correct answer after selection sort algorithm at the 4th step is:D

[0,1,2,4,8,10].

The complete detail of step by step execution is shown in the attached document file.

Ver imagen asarwar
RELAXING NOICE
Relax