Question d’entretien chez Cognizant

Coding question based on array