Pergunta de entrevista da empresa Tencent

I did in python, biggest K elements