Valeo Interview Question

write code to swap array