Leetcode 347 - Top K Frequent Elements (JAVA Solution Explained!)

preview_player
Показать описание
Leetcode 347 - Top K Frequent Elements (JAVA Solution Explained!)

If you like this video, please 'Like' or 'Subscribe'. This is really helpful for my channel and also motivates me to do more. Stay tuned!
Рекомендации по теме
Комментарии
Автор

I like this approach, deepens my understanding for priority queues

KaiAbyss
Автор

Nice solution
i was confuse about comparator usage .

alonewolf
Автор

Super clear explanation, thank you! Please continue to make more leetcode videos!!

TruffleLover
Автор

i love your explanation man. so easy to understand and follow. please keep them coming i will be watching all your solutions.

moezzzz
Автор

Awesome explanation sir, nice video, everything got crystal cleared.

mayank_singh_
Автор

For the getKey is getting the frequency? Like 1 the getKey will get 3?

yangjunjie
Автор

Please explain time complexity of this code

priyankashaw
Автор

how is this the top result on youtube? It says in the question you have to do better than O(nlogn)

Inkarnid
Автор

noob here, can anyone explain the prioritize part?

devsutong
Автор

What's the time complexity of this solution?

damianm
Автор

bro you gotta explain your stuff more i don't know what you're doing.

gyroxaver
Автор

Follow up: Your algorithm's time complexity must be better than O(n log n), where n is the array's size.

this was the main thing but you didn't address

Makwayne
Автор

can u please explain ((a, b) -> b.getValue() - a.getValue()) ?

shivamdhir
Автор

Excellent video!
But I don’t understand this fragment:
(a, b)-> b.getValue()-a.getValue()

tonoabad