I get the wrong answer during submission but then I get the correct answer in a different python IDE

Hello,

I'm trying to solve the Top K Frequent Elements in my way. I get the correct answers for the challange in another python environment but when I submit it on leetcode, I get the wrong answer.

Any help would be much appreciate it

Here is my code:

image

Comments (0)