Pregunta de entrevista de Google

Based on HashMap and Sorting