Valeo interview question

write code to swap array