IBM Interview Question

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