Citadel interview question

Suppose you have an array