Insertion sort and selection sort