Paths Subjects Questions Quizzes Pricing Search
Algorithms & Data Structures Intermediate Pro

Heaps

Keep the most important element one pop away with binary heaps and priority queues

30 min read 0 views

Learn the binary heap / priority queue abstraction and the problem shapes it unlocks: top-k selection, merging sorted sequences, and running statistics over a stream. Covers Python's `heapq` module and four classic interview problems, from k-most-frequent strings to a live running median.

Practice questions (4)

  • K Most Frequent Strings

    Intermediate
    View →
  • Combine Sorted Linked Lists

    Advanced
    View →
  • Median of an Integer Stream

    Advanced
    View →
  • Sort a K-Sorted Array

    Intermediate
    View →

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.