IBM interview question

Coding Question: Figuring out a condition for elements in an array