Insertion
Selection
Shell
General
100

What is the average Big-O of Insertion Sort?

O(n2)

100

What is the best case big O of Selection Sort?

O(n2)

100

What is the average big O of Shell Sort (according to ZyBooks)?

O(n1.5)

100

How is Shell Sort slightly faster than Insertion and Selection Sort?

Shell Sort reduces the total number of swaps and comparisons, especially on large arrays.

200

Sort the following array (into ascending order) using Selection Sort:
[4, 2, 5, 3, 1]

[1, 2, 3, 4, 5]

200

Sort the following array (into ascending order) using Insertion Sort:
[9, 7, 10, 8, 6]

[6, 7, 8, 9, 10]

200

After trying to sort the following array (into ascending order) using Shell Sort with gap 2, what does the array look like after we sort the subarrays (but not fully completed the sort):
[24, 11, 14, 13, 22, 26]

24 (0), 14 (2), 22 (4) -> 14 (0), 22 (2), 24 (4) (sorted w insertion) 

11 (1), 13 (3), 26 (5) -> 11 (1), 13 (3), 26 (5) (sorted w insertion)

the new array after initial portion:
[14, 11, 22, 13, 24, 26]


200
Considering that Insertion and Selection Sort has the same O(n2) runtime, why do we even use it? What are acceptable scenarios where we can use these sorts?

It is still acceptable to use Insertion and Selection Sort on smaller data sets where simplicity is all that matters.