Insertion sort implemented.