218k views
4 votes
A charity organization has a large list of donor records, sorted alphabetically by name. Each record contains the amount of money donated in the current year. Which of the following expresses an algorithm to determine the biggest seven donors?

a. Seven passes through the outer loop of an insertion sort
b. Seven recursive calls to merge sort
c. Seven passes through the outer loop of a selection sort
d. Accessing the last seven entries in the list

User Perfect
by
5.4k points

1 Answer

5 votes

Answer:

The expression of an algorithm to determine the biggest seven donors is:

a. Seven passes through the outer loop of an insertion sort

Step-by-step explanation:

In Insertion Sort, each record containing an amount of money donated in the current year and the donor's name is compared to the previous records. If the previous records are greater than the particular element, then the previous record is moved to the next position. This process continues until the large list of donor records is sorted, and the biggest seven donors will be shown as the top seven on the list.

User Jlareau
by
4.8k points