Capgemini Engineering Interview Question

Quick sort and swap numbers