Affordplan interview question

Swap an array