Adobe Interview Question

Explain quick sort code and then optimisations