看板 Grad-ProbAsk 關於我們 聯絡資訊
請問這題該怎麼做呢~@@ 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