minimum
minimum
with the second element. If the second element is smaller than minimum
, assign second element as minimum
.minimum
with the third element. Again, if the third element is smaller, then assign minimum
to the third element otherwise do nothing. The process goes on until the last element.minimum
is placed in the front of the unsorted list.Pseudocode
Code