Skip to content

Topic 14 of 21

Heap & Priority Queue Problems

Binary heaps and priority queues: Kth largest and smallest, merging sorted lists, task scheduler, median of a data stream and top K frequent elements.

17 heap & priority queue problems (5 easy, 10 medium, 2 hard) with LeetCode and GeeksforGeeks links.

Your progress

– / 17 solved

Easy
–/5
Medium
–/10
Hard
–/2
  1. Introduction to Priority Queues Using Binary HeapsMediumGFG
  2. Min Heap and Max Heap ImplementationMediumGFG
  3. Check If an Array Represents a Min-Heap or NotMediumGFG
  4. Convert Min Heap to Max HeapMediumGFG
  5. Kth Largest Element in an Array [Use Priority Queue]EasyLeetCodeGFG
  6. Kth Smallest Element in an Array [Use Priority Queue]EasyGFG
  7. Sort K Sorted ArrayEasyGFG
  8. Merge M Sorted ListsHardLeetCodeGFG
  9. Replace Each Array Element by Its Corresponding RankEasyGFG
  10. Task SchedulerMediumLeetCodeGFG
  11. Hands of StraightsMediumLeetCodeGFG
  12. Design TwitterMediumLeetCodeGFG
  13. Connect N Ropes with Minimal CostMediumGFG
  14. Kth Largest Element in a Stream of Running IntegersEasyLeetCodeGFG
  15. Maximum Sum CombinationMediumGFG
  16. Find Median from Data StreamHardLeetCodeGFG
  17. K Most Frequent ElementsMediumLeetCodeGFG