Copperleaf interview question

reverse an array in place