Pergunta de entrevista da empresa Cognizant

A easy question on array was given