[問題] ternary tree

看板Grad-ProbAsk作者 (沒經驗不懂事)時間15年前 (2009/04/21 18:21), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
請問這題該怎麼做呢~@@ 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
文章代碼(AID): #19xPuzy7 (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #19xPuzy7 (Grad-ProbAsk)