I have created this program for priority queue and I am having a problem. I am getting the wrong output.
Here is the input:
Insert 10000 2
Insert 10000 2
Insert 10000 3
Insert 19444 9
Pop
Insert 10331 3
Pop
Pop
Pop
Pop
Pop
Here's what the output should be:
19444
10000
10331
10000
10000
-1
Here's the output which I get:
19444
10000
10000
10000
10331
-1
SOLVED !