Pregunta de entrevista de Infosys

Write code to find the second maximum element from the array?