Reduce Array Size to Half
Find minimum removals to reduce array size by half using greedy heap approach
Reorganize String (LC 767) — Greedy Max-Heap
Solve LC 767 with a greedy priority queue (max-heap). Learn the maxFreq ≤ ceil(n/2) condition + proof. O(n log k). Practice now.
Sort Characters by Frequency
Sort characters in string by frequency using heap or bucket sort
Task Scheduler
Schedule tasks with cooling period using greedy approach with heap
Top K Frequent Elements (LC 347) — Bucket Sort + Heap
Solve LeetCode 347 Top K Frequent Elements (Medium) with frequency map + bucket sort O(n) or min-heap O(n log k). Step-by-step for interviews.