问题描述
二项式堆
具有非常特殊的设计。个人而言,我不认为这种设计是直观的。
Binomial Heap
has quite special design. Personally I don't think this design is intuitive.
虽然帖子如谈论差异及其专长,我仍然在想什么时候应该使用它。
Although posts such as What is the difference between binary heaps and binomial heaps? talks about diff and its speciality, I am still wondering when I should use it.
在,它说
$ b $我假设二项式堆的优点是它的合并。然而, Leftist heap
也有O(logN)合并和更简单,为什么我们仍然使用二项式堆?何时应用二项式堆?
I presumes that an advantage of Binomial Heap is its merge. However, Leftist heap
also has O(logN) merge and much simpler, why we still use Binomial Heap? When should I use Binomial Heap?
编辑
我想在这里提出的一个实际问题是二项式堆的优点?
One of the actual question I wanna ask here is What's exactly the advantage of Binomial Heap?
推荐答案
的文章说:
所以看来,二项式堆的优点是插入速度更快。
So it appears that the advantage of Binomial heap is that insertions are faster.
至少这是asympotitic分析告诉我们的。现实世界的运行时间是完全不同的,正如基因在答案中所说的,取决于常数因素。您可以确定哪个更适合您的应用程序的唯一方法是测试它们。
At least, that's what asympotitic analysis tells us. Real world running time is something else entirely and, as Gene said in his answer, depends on constant factors. The only way you can determine which is better for your application is to test them.
这篇关于何时使用二项式堆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!