Pergunta de entrevista da empresa Walmart Global Tech

Find k elements of maximum frequency from a file.