Capgemini Engineering interview question

Quick sort and swap numbers