Insertion and selection sort