Citadel interview question

Array manipulation, simple algorithm questions