What does each iteration of the insertion sort algorithm do?
a. Each iteration takes the next smallest element and inserts it at the beginning of the array.
b. Each iteration takes the next element in the unsorted portion of the array and inserts it into the sorted portion.
c. Sorted subarrays are inserted into the larger array.
d. Each iteration determines the location of a pivot and inserts it into place.
b. Each iteration takes the next element in the unsorted portion of the array and inserts it into the sorted portion.
You might also like to view...
When you animate a slide element, a number is displayed to the left of the object indicating the order in which the animation occurs
Indicate whether the statement is true or false
What is the name of the most popular asymmetric encryption algorithm used today?
A) RSA B) AES C) RC4 D) MD5