Accenture interview question

WAP to swap to sort an array