hop of those help? You can use SortedSet if you use a more recent .NET Framework version.
How do you initialize a map that has a priority_queue as a value with the comparison object of the priority_queue?
By : user2732082
Date : March 29 2020, 07:55 AM
Hope that helps What is "compare"? If it's a function pointer, you must be very careful to not use it before you supply a value, as the default constructed priority_queue will use a null pointer. The easiest way to ensure non-null pointers – if you cannot rewrite or wrap as shown below – is, ironically, to never use the index operator; instead use the find and insert methods. If "compare" is instead a functor, then it should be written so its default construction does exactly what's needed (often nothing) – it is very rare for this to not be possible.