Heaps are commonly known as priority queues and mostly used in ranking problems. In this lesson, we will learn how to solve a few of the most commonly asked problems in an interview using a priority queue.
- Fundamentals of the heap and priority queue
- Sliding window maximum
- Find Kth smallest element
- K top most frequent words/elements/chars
- Find Kth smallest in a matrix
- Merge sorted lists
- K smallest pairs
- Find the median in a data stream
- Kth largest in a stream
- Kth closest point to the origin.