# Priority queue interview questions

### Top K Frequent Keywords

Given a list of reviews, a list of keywords and an integer k. Find the most frequent k keywords in order of most to least frequently mentioned. The comparison of ...

### Priority Queue problems

A priority queue a data structure that keeps things in order of priority. The question is how is it different from the monotonic queue we discussed earlier. The difference is ...

### Minimum cost of connecting n ropes

Given n ropes of different lengths, connect these ropes in one rope. The cost to connect two ropes is equal to the sum of their lengths. We have to connect ...

### Most frequent words in file

Most frequent words in file In last post:  find K smallest element in an array, we learned some concepts to find top or bottom element in a given set. Let's ...

### Median of integers stream

Median of integers stream We solve two problems which involved streams, first was to find first non repeated character in stream and second was LRU cache. Let's discuss another problem ...

### Merge k sorted arrays

Given k sorted arrays of varying lengths, merge these k sorted arrays into one sorted array. For example, given 3 arrays: The resulting array should be like [expand title=" Companies ...

### Heaps fundamentals

In this post will learn heap fundamentals, which are very important for solving priority queue problems. Heap is a kind of data structure based on the complete tree principle. By ...

### Find Kth smallest element in array

Given an array of integers which is non sorted, find kth smallest element in that array. For example: if input array is A = [3,5,1,2,6,9,7], 4th smallest element in array ...