English 中文(简体)
Binomial queue
原标题:Regrading rank in Binomial queue

我读到的是:Binomial queue 行动here

联系的底部是指

B. 血清

  1. deletemin operation requires ability to find all subtrees of the root. Thus children of each node should be available (say a linked list)
  2. deletemin requires that the children be ordered by the size of their subtrees.
  3. we need to make sure it is easy to merge tress. Two binomial trees can be merged only if they have the same size, hence the size of the tree must be stored in the root. While merging, one of the trees becomes the last child of the other, so we should keep track of the last child of each node. A good data structure to use is a circular doubly linked list what each node is of the following form:
data | first |left    | right |rank No. of |
--------------------------------------------
       child |sibling |sibling| children 

以上是作者所称的“No. Of? 如果有的话,请作解释。

最佳回答

据我所知,他试图说:我们储存了<条码>>>rank<>/条码>,该编码与《儿童第<条码>有误。 (通常如何界定这些树木的等级)。 因此,你只是在每个节点储存:

  • data represents the element in the tree
  • first represents a pointer to the linked list of children (i.e. a pointer to the first child)
  • left is a pointer to the left neighbour
  • right is a pointer to the right neighbour
  • rank is simply the rank of the binomial tree
问题回答

说明要求 “只有具有相同规模的 bin树才能合并,因此树木的规模必须储存在根基中”。

看来,提交人不是“小林区”而是“儿童人数”领域。 这令人困惑,但对于执行工作来说,这是很不错的,因为小树的面积是2 ># of children}。 因此,你可以比较儿童人数,而不是比较小林面积。





相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签