4 ms·
He says BinaryHeap is superfluous, but then complains there's not a priority queue. Huh? A binary heap is a priority queue. (Specifically, a binary heap is an
by paulddraper 10y ago
He says BinaryHeap is superfluous, but then complains there's not a priority queue. Huh?
A binary heap is a priority queue. (Specifically, a binary heap is an implementation of a priority queue, just as a linked list is an implementation of a list.)
Even after the "they're fundamentally very different" update, he's still wrong.
Wanna know what the (non-synchronized) priority queue is called in Python? heapq https://docs.python.org/3.5/library/heapq.html https://docs.python.org/3.5/library/heapq.html Critique that next, please.
- desdiv 10y agoYeah, he made an embarrassing mistake. I googled "rust binary heap" and the second link[0] is a priority queue example using the std binary heap. [0] https://doc.rust-lang.org/std/collections/binary_heap/ https://doc.rust-lang.org/std/collections/binary_heap/
- paulddraper 10y agoThe weird thing is...after having that brought to his attention, he reasserts his error.