About 79,800 results
Open links in new tab
  1. java - How do I use a PriorityQueue? - Stack Overflow

    Mar 25, 2009 · How do I get a PriorityQueue to sort on what I want it to sort on? Also, is there a difference between the offer and add methods?

  2. Priority Queue of an array of integers in java - Stack Overflow

    Jul 7, 2020 · Priority Queue of an array of integers in java Asked 5 years, 6 months ago Modified 1 year, 10 months ago Viewed 26k times

  3. java - Change priorityQueue to max priorityqueue - Stack Overflow

    I have priority queue in Java of Integers: PriorityQueue<Integer> pq= new PriorityQueue<Integer> (); When I call pq.poll () I get the minimum element. Question: how to change the code ...

  4. java - PriorityQueue<Integer> with lambda expression - Stack …

    Oct 9, 2020 · That is your comparator, to wit, a lambda expression which implements a Comparator<T>, and which you pass as an argument into your priority queue constructor. …

  5. priority queue - Java: PriorityQueue initializations - Stack Overflow

    Jan 31, 2018 · In Priority Queue you will essentially put user define objects, so to do it priority queue asks you how to order these objects (because priority queues are like heap data …

  6. Priority queues of objects in Java - Stack Overflow

    Oct 16, 2012 · Priority queues of objects in Java Asked 13 years, 2 months ago Modified 13 years, 2 months ago Viewed 27k times

  7. Java Priority Queue reordering when editing elements

    Aug 5, 2011 · I'm trying to implement Dijkstra's algorithm for finding shortest paths using a priority queue. In each step of the algorithm, I remove the vertex with the shortest distance from the …

  8. How is the java.util.priorityqueue implemented? - Stack Overflow

    Oct 20, 2011 · Does anyone know the implementation details for the standard java priority queue? heap? skiplist?

  9. priority queue - How do I find the index of an item in a …

    May 15, 2012 · An unbounded priority queue based on a priority heap. You can't use a priority heap to find the index of an element effectively. It only knows the first one and when you pop it …

  10. Priority Queue in Java - Stack Overflow

    Oct 25, 2010 · Priority Queue in Java Asked 15 years, 2 months ago Modified 13 years, 3 months ago Viewed 12k times