Practice Coding problems on Heaps
Practice Problems on Heaps
- Max Heaps
- Min Heaps
- Priority Queues - Max / Min
- Heap Sort (Out of place / In place)
- Check if a given array represent min/max heap or not
- Check if a given binary tree repesents min/max heap or not
- Print all the elements in sorted order from row and column wise sorted matrix
- Convert max heap to min heap in linear time
- Find kth largest/smallest element in a given array
- Merge ‘k’ sorted lists each containing ‘n’ elements
- External merge sort
- Huffman coding
- Convert BST to min heap
- Sort numbers, such that each number is stored in a different machine
- Number of ways to form a heap with ‘n’ distinct integers
- Smallest/Largest derangement of sequence
- Print all the nodes less than value ‘x’ in a min heap
- Leftist Heap
- Median of stream of running integers
- Binomial heaps
- Connect n ropes with min cost
Comments
Post a Comment