Tencent interview question

I did in python, biggest K elements