Zinnia Interview Question

simple DSA question based on array searching