Frage im Vorstellungsgespräch bei Infosys

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