I
imutate
How do you use std:riority_queue to store say an index type (call it
intidx) and sort using another integer type (but smallest weight at the
top) ? How do you pop off the top index ? I mean top() returns the
top element but how do you access the index and the weight.
Is it std:riority_queue <intidx, int>; ? Where does the comparison
fit into it ?
intidx) and sort using another integer type (but smallest weight at the
top) ? How do you pop off the top index ? I mean top() returns the
top element but how do you access the index and the weight.
Is it std:riority_queue <intidx, int>; ? Where does the comparison
fit into it ?