Limited access

Upgrade to access all content for this subject

What is the best case and worst case run times for an INSERTION SORT?

O represents big-O notation and n is the number of elements in the array or list.

A

best case: O(n), worst case: O(n-squared)

B

best case: O(n), worst case: O(n)

C

best case: O(n-squared), worst case: O(n-squared)

D

best case: O(n log n), worst case: O(n log n)

E

best case: O(1), worst case: O(n-squared)

Select an assignment template