Insertion-Sort

6 5 2 1 3 4 0
5 6 2 1 3 4 0
2 5 6 1 3 4 0
1 2 5 6 3 4 0
1 2 3 5 6 4 0
1 2 3 4 5 6 0
0 1 2 3 4 5 6

gemessene Arbeitsschritte: 62

Anzahl der Elemente n: 7
gerechnete Arbeitsschritte: 30 <= x <= 93
Best Case= 5*(n-1)
Worst Case= 3/2*n2+7/2*n-5

SelectionSort liegt somit in der Komplexitätsklasse O(n2)!