What does one insertion step do?
What does one bubble sort pass do?
With an early exit flag, what does bubble sort do on a list that is already sorted?
Why are both methods O(n squared)?
In the worst case, how many comparisons does insertion sort make on seven values?
Réponse : ______________
Insertion sort runs in nearly linear time on nearly sorted input.
En entourer un : Vrai Faux
A student claims bubble sort always beats insertion sort because swapping looks faster. What is the error?
Six values need 15 worst case comparisons. Roughly how many for twelve values?