• Problems
  • Contest
  • Discuss
    • Online InterviewOnline Interview
    • AssessmentAssessment
    • Redeem
    • Premium
All Time
数据为空数据为空
No search result
Important Patterns in Heap/Priority Queue with link to problems.
Abhijit Roy
3161
Heap (Priority Queue)Hash TableCareer

Common heap problems and patterns

Top K frequent patterns/ heaps + hashmap
347 . https://leetcode.com/problems/top-k-frequent-elements/

  1. https://leetcode.com/problems/top-k-frequent-words/
  2. https://leetcode.com/problems/sort-characters-by-frequency/
    K closest Pattern
  3. https://leetcode.com/problems/find-k-closest-elements/
  4. https://leetcode.com/problems/k-closest-points-to-origin/
    Other heap patterns
  5. https://leetcode.com/problems/task-scheduler/
  6. https://leetcode.com/problems/find-median-from-data-stream/
  7. https://leetcode.com/problems/furthest-building-you-can-reach/
  8. https://leetcode.com/problems/course-schedule-iii/
  9. https://leetcode.com/problems/last-stone-weight/
  10. https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/
    Kth largest/smallest
  11. https://leetcode.com/problems/kth-largest-element-in-an-array/
  12. https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/

https://leetcode.com/problems/top-k-frequent-words/discuss/2773643/java-6ms-beats-95-with-explanation-hashmap-priorityqueue-min-max-heap-solution.

Will update the list again

Comments (0)
Explore
Download App
Support
Terms
Privacy Policy
More
Copyright © 2026 LeetCode
United States