+ 1
Help me (Priority Queue, Data Structure, C language)
Whats wrong with this code? Why the last Gold and Platinum don't go to their priority place? https://sololearn.com/compiler-playground/cVMh5c3MzYip/?ref=app
3 odpowiedzi
0
As soon as the first Platinum is in the queue, all other priorities are either greater or equal to the head's priority. Thus, all others are added to the queue via the code block at line 43.
0
Gordie isn't it suppossed to be :
cccc Platinum
gggg Platinum
bbbb Gold
ffff Gold
aaaa Silver
dddd Silver
eeee Silver
??
0
I suppose so. I was merely pointing out where there is a logical error in your code.