How does Java's PriorityQueue differ from a min-heap?

Why did they name PriorityQueue if you can't insertWithPriority? It seems very similar to a heap. Are there any differences? If no difference, then why was it named PriorityQueue and not Heap?

48
задан roottraveller 15 July 2017 в 19:07
поделиться