看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《Kovainen (卡瓦寧)》之銘言: : Q1:What are the minimum and maximum numbers of elements in a heap of hight h? ^^^^^^^ ^^^^^^^ 請問你heap可為空嗎?↑ ↑我個人認為最多個數題目資訊不足,不敢保證。 : Q2:Assume we have two linked lists with first node pointed by head1 and head2 : respectively. What would happen if we applied head1=head2 to these two lists? 閣下似乎沒寫過程式@@ 或者是外系生,請以兩棵樹去想。 " = " 代表 assign : Q3:Write a pseudo code that traverses a linked list and delete all nodes whose : keys are negative. 假設 head node 為 first。題目並未說明是 cycle or other list,所以挑一種。 至於 negative key 只要加上一個條件是判斷,然後將前後串接極可。 ( 若真的不會寫我再補 code ) : 有請各為資料結構高手解答 : 感激不盡: ) -- 我的露天拍賣:http://class.ruten.com.tw/user/index00.php?s=outdoorsell -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.207.167 ※ 編輯: assassin88 來自: 140.114.207.167 (07/17 23:08)
Kovainen:補:heap可為空 題目沒說我想應該可以吧 07/18 00:22
assassin88:我回信給你了 07/18 08:51
ooooooo:...heap 高度要為n 跟空不空什麼關係 07/18 12:06