Adobe interview question

Explain quick sort code and then optimisations