Problem library
Heap
All problems that are about heap.
44
/ 44 problems
| Problem | Category | Time | Solved |
|---|---|---|---|
|
Maximum subsequence score
heap
|
O(nlog(n)) | May 23, 2023 | |
|
Kth largest sum in a binary tree
heap
tree
|
O(nlog(k)) | May 21, 2023 | |
|
K-th smallest prime fraction
heap
|
O(klog(n)) | May 20, 2023 | |
|
Make array zero by subtracting equal amounts
heap
math-and-geometry
|
O(nlogn) | May 13, 2023 | |
|
Maximum product of two elements in an array
heap
|
O(n) | May 13, 2023 | |
|
Find score of an array after marking all elements
heap
|
O(nlog(n)) | May 6, 2023 | |
|
Maximal score after applying k operations
heap
|
O(klog(n)) | Jan 9, 2023 | |
|
Maximum ice cream bars
greedy
heap
|
O(nlog(n)) | Jan 6, 2023 | |
|
Divide intervals into minimum number of groups
heap
intervals
|
O(nlogn) | Jan 2, 2023 | |
|
K highest ranked items within a price range
heap
graph
|
O(mnlog(mn)) | Jan 2, 2023 | |
|
Most popular video creator
array-and-hashmap
heap
|
O(nlog(n)) | Dec 25, 2022 | |
|
Minimum cost to connect sticks
heap
|
O(nlog(n)) | Dec 11, 2022 | |
|
Find k pairs with smallest sums
heap
|
O(klog(n)) | Dec 5, 2022 | |
|
Meeting rooms III
intervals
heap
|
— | Nov 26, 2022 | |
|
Process tasks using servers
heap
|
O(nlog(n)) | Nov 22, 2022 | |
|
Total cost to hire k workers
heap
|
O(nlog(n)) | Nov 21, 2022 | |
|
Number of orders in the backlog
heap
|
O(nlog(n)) | Nov 20, 2022 | |
|
Maximum product after k increments
heap
|
O(klog(n)) | Nov 19, 2022 | |
|
Least number of unique integers after k removals
heap
|
O(n+klog(n)) | Nov 12, 2022 | |
|
Longest uploaded prefix
heap
design
|
O(n) | Oct 26, 2022 | |
|
Minimum operations to halve array sum
heap
|
O(nlog(n)) | Oct 19, 2022 | |
|
Single threaded cpu
heap
|
O(nlog(n)) | Oct 7, 2022 | |
|
Maximum performance of a team
heap
|
O(nlog(n)) | Sep 11, 2022 | |
|
Design a food rating system
heap
design
|
O(nlog(n)) | Sep 9, 2022 | |
|
The number of weak characters in the game
heap
|
O(nlog(n)) | Sep 9, 2022 | |
|
Find k closest elements
heap
|
O(nlog(k)) | Sep 8, 2022 | |
|
Query kth smallest trimmed number
heap
|
O(q*nlog(n)) | Sep 6, 2022 | |
|
Remove stones to minimize the total
heap
|
— | Sep 6, 2022 | |
|
Seat reservation manager
heap
|
O(n) | Sep 6, 2022 | |
|
Smallest number in infinite set
heap
|
O(nlog(n)) | Sep 6, 2022 | |
|
Sell diminishing valued colored balls
heap
|
O(nlog(n)) | Sep 3, 2022 | |
|
Furthest building you can reach
heap
|
O(nlog(l)) | Aug 30, 2022 | |
|
Minimum number of refueling stops
heap
|
O(n*log(n)) | Aug 20, 2022 | |
|
The k weakest rows in a matrix
heap
|
O(n*m*log(k)) | Aug 20, 2022 | |
|
Find median from data stream
heap
design
|
O(1) | Aug 7, 2022 | |
|
Design twitter
heap
design
|
O(1) | Aug 6, 2022 | |
|
Kth smallest element in a sorted matrix
heap
|
O(m*n*log(k)) | Aug 2, 2022 | |
|
Top k frequent words
heap
|
O(n + k * log(n)) | Jul 30, 2022 | |
|
K closest points to origin
heap
|
O(nlog(n)) | Jul 23, 2022 | |
|
Kth largest element in an array
heap
|
O(n) | Jul 23, 2022 | |
|
Last stone weight
heap
|
O(nlog(n)) | Jul 23, 2022 | |
|
Meeting rooms II
intervals
heap
|
O(nlog(n)) | Jul 23, 2022 | |
|
Task scheduler
heap
|
O(n) | Jul 23, 2022 | |
|
Kth largest element in a stream
heap
|
O(1) | Jul 20, 2022 |
No matching problems
Try clearing one of the filters.