Top K Frequent Elements | LeetCode

Published: 09 June 2021
on channel: Coding With Jaz
1,637
35

Hello friends! Today we are looking at a problem that's solved by a fixed-sized heap. The runtime analysis on this solution is pretty fun so make sure to watch it!

This video is divided into 4 parts:

Part I: Problem description and examples 0:11
Part II: Intuitive solution and runtime 1:35
Part III: Optimized solution and runtime 5:09
Part IV: Code to the optimized solution 7:55

Overall Runtime: O(nlogk)
Overal Space: O(n+k)

Similar questions:
https://leetcode.com/problems/kth-lar...
https://leetcode.com/problems/top-k-f...

Hope you enjoy this video and happy coding!

Let's be friends:
My website where I occasionally post blogs: JazWang.com
Email: CodingWithJaz@gmail.com


On this page of the site you can watch the video online Top K Frequent Elements | LeetCode with a duration of hours minute second in good quality, which was uploaded by the user Coding With Jaz 09 June 2021, share the link with friends and acquaintances, this video has already been watched 1,637 times on youtube and it was liked by 35 viewers. Enjoy your viewing!