Pregunta de entrevista de Google

Given an array find the second most frequent element