Pergunta de entrevista da empresa Pentaloop

How to find second largest element in an array?