Pergunta de entrevista da empresa Infosys

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