Which of the following sorting algorithms is described by this text? "Take the item at index 1 and see if it is in order compared to the item at index 0. If it is not, then swap the two items. Next, take the item at index 2 and compare it to the items at the lower indexes. Move items in the lower indexes to a higher one until you find the proper location to place the value so that it is in the correct order. Continue this process with all remaining indexes."
a. insertion sort
b. selection sort
c. merge sort
d. quick sort
e. binary sort
An array of integers is to be sorted from smallest to biggest using a selection sort. Assume the array originally contains the following elements:
11 17 30 8 20 25
What will it look like after the third pass through the for loop?
a. 8 11 17 20 25 30
b. 8 11 17 30 20 25
c. 8 17 30 11 20 25
d. 8 11 17 20 30 25
e. 8 11 30 17 20 25