Accenture Interview Question

array and logical coding question