In the constructor of PriorityQueue, we can pass in a collection like List or Set, which builds the PriorityQueue in linear time. However, this also means the PriorityQueue will use a default Comparator.
I want to use my own comparator, so I can have something else other than a min heap. The only way I can think of is to wrap the collection in a SortedSet and put a customized comparator in it.
Is there any other good way to do this?