Odessa interview question

What is the logic for selection and insertion sort?