Pergunta de entrevista da empresa ValueLabs

find second maximum number in the array using single for loop?