Problems
There are many popular problems based on Heap and Priority Queue. Some of them are Special Array Operation, Monk and Champions League, AND choices, and Seating Arrangement. Let's explore some problems related to Heap and Priority Queues.
Converting a BST to Min Heap
By Akshat Chaturvedi
● Published At Oct 2021
In this blog, we’ll learn how to convert a given Binary Search Tree to a Min Heap. ... Keep reading ..
Kth smallest element in a row-wise and column-wise sorted 2D array
By Akshat Chaturvedi
● Published At Oct 2021
In this blog post, we will learn various algorithms to find the Kth smallest element in a row-wise and column-wise sorted 2D array.... Keep reading ..
N Max Pair Combinations
By Akshat Chaturvedi
● Published At Oct 2021
In this blog post, we’ll learn an interesting problem pair sum related to arrays and heaps.... Keep reading ..
Connect N Ropes
By Malay Gain
● Published At Oct 2021
In this article, we will discuss a problem of Connect N Ropes.... Keep reading ..
Median of Stream of Integers Problem
By Arun Nawani
● Published At Oct 2021
In this problem, our objective would be to print the effective median of a stream of integers after every incoming element. ... Keep reading ..
Connect N ropes with minimum cost
By Urwashi Priya
● Published At Oct 2021
This article will brief you on the problem connect N ropes with minimum cost.... Keep reading ..
Sum and product of K smallest and largest Fibonacci numbers in the array
By Shreya Deep
● Published At Dec 2021
This article discusses how to find the sum and product of K smallest and largest Fibonacci numbers in the array.... Keep reading ..
K-th Smallest Pair Sum in The Given Array
By Rhythm Jain
● Published At Dec 2021
This article discusses the problem of obtaining the K-th Smallest Pair Sum in given Array... Keep reading ..
Maximum product of an Array after subtracting 1 from any element N times
By Debarati Ghatak
● Published At Jan 2022
This blog will discuss the problem of finding the maximum product of an array after subtracting 1 from any element N times. ... Keep reading ..
Find the K closest points to origin using Priority Queue
By Vibhor Bhatnagar
● Published At Nov 2021
In this article, we will discuss the problem find the K closest points to origin using priority queue.... Keep reading ..
Length of longest subsequence such that prefix sum at every element remains greater than zero
By Debarati Ghatak
● Published At Nov 2021
In this blog, we will discuss the approach and solution to the given problem in depth.... Keep reading ..
The maximum sum of two non-overlapping intervals in a list of Intervals | Interval Scheduling Problem
By Vibhor Bhatnagar
● Published At Dec 2021
This article will discuss the maximum sum of two non-overlapping intervals in a list of Intervals | Interval Scheduling Problem. ... Keep reading ..
Minimum Difference Between Maximum and Minimum Value of Array with Given Operations
By Ishita Chawla
● Published At Dec 2021
This blog will discuss the problem to find the Minimum Difference Between the Maximum and Minimum Value of Array with Given Operations and its implementation in different languages. ... Keep reading ..
Find The Minimum Range Size That Contains The Given Element for Q Queries
By Malay Gain
● Published At Dec 2021
In this article, we will see the approaches to find the minimum range size that contains the given element for Q queries.... Keep reading ..
Trapping Rain Water in a Matrix
By Soumya Agrawal
● Published At Feb 2022
In this blog, we will understand the concept behind trapping rainwater in a matrix and solve this problem.... Keep reading ..
Merge K Sorted Arrays
By Harsh Goyal
● Published At Jan 2022
This blog will cover the brute force approach to solve the problem “Merge K sorted Arrays” and take you to the efficient method to solve this problem. ... Keep reading ..
Merge two sorted arrays using a Priority queue
By Vibhor Bhatnagar
● Published At Nov 2021
In this article, we will discuss the problem merge two sorted arrays using a priority queue.... Keep reading ..
K-th Smallest Element in the Unsorted Array using a Priority Queue
By Ayush Tiwari
● Published At Nov 2021
This blog discusses the to find K-th smallest element in the unsorted array by using a Priority queue. Read the whole blog for the detailed solution.... Keep reading ..
Minimize cost to convert all characters of a binary string to 0s
By Riya
● Published At Jan 2022
This article will discuss the problem "Minimize cost to convert all characters of a binary string to 0s" in which we have to find the minimum cost to convert all characters of a binary string to 0s, the approach to solve this problem, its C++ impleme... Keep reading ..
Maximum possible Sum of the Array After performing the given operations
By Vaibhav Agarwal
● Published At Dec 2021
In this article, we will discuss the problem of finding the maximum sum of an array under the given conditions. ... Keep reading ..
Last Element Remaining by Deleting the Two Largest Elements and Replacing them with Their Absolute Difference If They are Unequal
By Saksham Gupta
● Published At Jan 2022
In this blog, we will discuss a famous priority queue question, i.e., the last element remaining by deleting the two largest elements and replacing them with their absolute difference if they are unequal. ... Keep reading ..
Reduce the Array to at Most one Element by the Given Operation
By Firdausia Fatima
● Published At Jan 2022
In this blog, we'll use sorting and a priority queue (max heap) to solve an interesting problem, reduce the array to at most one element by the given operation. ... Keep reading ..
K Closest Points To Origin
By Malay Gain
● Published At Nov 2021
In this article, we will learn how to solve the K Closest Points To Origin problem.... Keep reading ..
Rearranging String
By Sandeep kamila
● Published At Nov 2021
This blog will cover the different approaches to the problem of rearranging string with an explanation and its C++ code. ... Keep reading ..
Car Pooling
By Yogesh Kumar
● Published At Nov 2021
In this blog, we will discuss the solution to the Leetcode problem - Car pooling with brute-force in an optimized manner. ... Keep reading ..
Lexicographically Largest String using at most K Swaps at Same Parity Indices
By Reet Maggo
● Published At Dec 2021
This article will teach how to find the lexicographically largest string using at most K swaps at the same parity indices while discussing the time complexity of the program.... Keep reading ..
Process Tasks Using Servers
By Saksham Gupta
● Published At Jan 2022
In this blog, we will discuss one of the famous questions on Leetcode and an important question from the interview perspective, i.e., Process Tasks Using Servers. ... Keep reading ..