作者missluk (没经验不懂事)
看板Grad-ProbAsk
标题[问题] ternary tree
时间Tue Apr 21 18:21:46 2009
请问这题该怎麽做呢~@@
Ternary tree is a tree in which each interior node can have at most 3
children. Ternary heap is a full ternary tree with some of the rightmost
leaves in the lowest level removed. Here, we implement priority queue by
ternary heap tree (with array implementation) in which the priority of node v
isn’t less than the priority of its children. Assume that the index of root
is one.
a) Calculate the indices of three elements which are children of i-th element
b) What is the index of the element which is a parent of the i-th element
c) Show the ternary heap tree that results after successively inserting
the integer 10,5,4,6,8,9,1,3,7 into an initially empty ternary heap tree
d) What is the result of two successive EXTRACT-MAY operation of the tree in (c
这题的c和d小题~
麻烦了:)
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 58.99.94.37