Re: [理工] [資結]-Link list和Heap的問題
※ 引述《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)
推
07/18 00:22, , 1F
07/18 00:22, 1F
→
07/18 08:51, , 2F
07/18 08:51, 2F
→
07/18 12:06, , 3F
07/18 12:06, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):