Eightfold interview question

Quick sort algo question. Typical engineering question.