Citadel Interview Question

Suppose you have an array