Domanda di colloquio di Eightfold

Quick sort algo question. Typical engineering question.