Pregunta de entrevista de Hexaware Technologies

Arrays based medium level question