0

I need a data structure like a Priority Queue that allows me to enter an element by specifying a priority value. (Ex: queue.add( "Element", 12); where 12 is the priority of value.

If doesn't exist a similar method, can you suggest me the most efficient way to do this?

Thanks

0 Answers0