J
John
I have a priority_queue that stores its elements in a vector.
What is the fastest way to copy all the elements of the
priority queue to this vector. Right now I use pop() to pop
all the elements one by one and copy it to the output vector.
I was thinking maybe one can inherit the priority_queue class
to get access to the internal vector so that copy would be fast.
Any ideas?
Thanks,
--j
What is the fastest way to copy all the elements of the
priority queue to this vector. Right now I use pop() to pop
all the elements one by one and copy it to the output vector.
I was thinking maybe one can inherit the priority_queue class
to get access to the internal vector so that copy would be fast.
Any ideas?
Thanks,
--j