CGI interview question

Get the second max element from array.