Pregunta de entrevista de LenDenClub

Sorting algorithm question and python basic question