Pages

Showing posts with label insertion sort. Show all posts
Showing posts with label insertion sort. Show all posts

Tuesday, July 26, 2011

Insertion sort

Efficient for small lists, with size less then 30.

Special cases are:
  • if list is almost sorted, it will be near linear time
  • if sorted list is reversed, it will be quadratic time

Java

C#