No. of comparisons: 0 No. of swaps: 0
for(i = 0 to length(list)-1)
min = i
for(j = i+1 to
length(list))
if(list[j]
< list[min])
min = j
if(min != i)
swap(list[i], list[min])
---------------------
| SHORT EXPLANATION |
---------------------
1. Set the first unsorted element as the minimum.
2. Iterate through the rest of the list to find the true
minimum.
3. Swap the minimum with the first unsorted element to
build the sorted sublist.
2. Repeat steps 1 to 3 until the whole list is sorted