Is it possible to pass a comparator to a PriorityQueue in python
Is it possible to pass a comparator to a PriorityQueue in python Question: I want to use a PriorityQueue to which I need to add objects of a class (say Node) which I cannot modify. I need these objects prioritized based on a field of the object. I tried adding them as tuples(node.val, node) to …