Pregunta de entrevista de Odessa

What is the logic for selection and insertion sort?