Create priorityQueueWithComparator