Heap Problems

Master heaps by solving these carefully selected problems

Problems

215. Kth Largest Element in an Array
Given an integer array `nums` and an integer `k`, return the `kth` largest element in the array.
Medium
347. Top K Frequent Elements
Given an integer array `nums` and an integer `k`, return the `k` most frequent elements. You may return the answer in any order.
Medium
295. Find Median from Data Stream
The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values.
Hard
23. Merge k Sorted Lists
You are given an array of `k` linked-lists `lists`, each linked-list is sorted in ascending order.
Hard
973. K Closest Points to Origin
Given an array of `points` where `points[i] = [xi, yi]` represents a point on the X-Y plane and an integer `k`, return the `k` closest points to the origin `(0, 0)`.
Medium