Insertion Sort

  • Insertion sort compares with all the numbers before it.

9,4,2,8,3,5
  • Quick sort is faster

  • Insertion sort is slower than quick sort on average    

  • On²

  • To modify exisiting array is a reason to use by ref rather than by Va

How to determine