Insertion Sort

Best Case

Session 2 - Insertion Best Case.png#invert

Worst Case

Session 2 - Insertion Worst Case.png#invert

Insertion Sort Summary

Is insertion sort a fast sorting algorithm?

  • Moderate, for small n
  • Not at all, for large n

Advantages

  • Good running time for almost sorted arrays

Disadvantages

  • running time in worst and average case