I only got one question wrong.

Question:

A computer scientist is analyzing four different algorithms used to sort a list. The table below shows the number of steps each algorithm took to sort lists of different sizes.

List Size
Number of Steps

for Algorithm A

Number of Steps

for Algorithm B

Number of Steps

for Algorithm C

Number of Steps

for Algorithm D

1 10 2 1 1 2 20 4 2 4 3 30 8 6 9 4 40 16 24 16 5 50 32 120 25 Based on the values in the table, which of the algorithms appear to run in reasonable time?

Select two answers.

I said the answer was Algorithm B. The actual answer was A and D.

As the size of the list grows, the number of steps needed to sort the list grows at an exponential rate, as the number of steps is equal to 2n for a list of size n . This indicates that the algorithm does not run in a reasonable amount of time.