Showing 18 of 18 questions
Easy: 0
Medium: 0
Hard: 0
Overview
Heaps are specialized tree-based data structures that maintain a specific ordering property. This section covers heap operations and their applications in solving interview problems.
Key Concepts
- Min heap and max heap
- Heap operations (insert, extract, peek)
- Heapify process
- Priority queues
- K-way merge
- Top K problems
Common Problems
Easy
- Kth Largest Element in a Stream
- Last Stone Weight
- Relative Ranks
Medium
- Kth Largest Element in an Array
- Top K Frequent Elements
- Find Median from Data Stream
- Merge K Sorted Lists
Hard
- Sliding Window Median
- Find Median from Data Stream
- IPO
Practice Tips
- Heap choice: Min heap for smallest, max heap for largest
- Time complexity: Insert and extract are O(log n)
- Space efficiency: Heaps can be implemented with arrays
- Two heaps: Useful for median finding problems