question:
Suppose that we use insertion sort on a randomly ordered array where elements hava only one of three values. Is the running time linear, quadratic or someting in between?
answer:
Quadratic //N^2
question:
Suppose that we use insertion sort on a randomly ordered array where elements hava only one of three values. Is the running time linear, quadratic or someting in between?
answer:
Quadratic //N^2