python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to push pair from priority queue into a 2D array?
I am doing a leetcode problem, and I am required to return a 2d array of results. But I am using a priority queue for that and am unable to move elements to a 2d array. I am not able to come up with a...

shinzoabey_
Votes: 0
Answers: 1
Circular (priority) queue in C
I have found following code for a circular queue (probably). But I can't understand function circ_queue_getFirst. As I see the code initialises struct. Then we can append (not shown) up to 5 elements,...
cs_student
Votes: 0
Answers: 0
how to prevent priority queue from having duplicate values at c++
now I'm trying to use priority queue in c++ like this
struct compare
{
bool operator()(const int &a, const int &b)
{
return weight[a] < weight[b];
}
};
priority_queue<...

Omar Fareed
Votes: 0
Answers: 1
Why is this minHeap implementation incorrect?
I am using a PriorityQueue to solve the Meeting Rooms II problem from Leetcode. I have developed my own solution that fails on certain test cases, yet from my eyes it is indistinguishable from the pro...
calvinhobbes123
Votes: 0
Answers: 2