[問題] 有關樹的問題

看板TransCSI作者 (喔)時間18年前 (2007/10/27 11:10), 編輯推噓3(304)
留言7則, 3人參與, 最新討論串1/1
我作到一題題目 Which of the following is true about the "tree" data tructure? 其中 (A)Number of internal nodes = number of external (leaf) nodes - 1 (E)Each node in the tree has only one parent node 為什麼不對呢 每個點不是應該只有一個parent node?? 不好意思 麻煩了 謝謝呦 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.23.121

10/27 18:13, , 1F
A 只有 binary tree 成立,這題應該沒特別說是 binary 吧
10/27 18:13, 1F

10/27 22:06, , 2F
只有說tree...沒有說binary tree...
10/27 22:06, 2F

10/27 22:06, , 3F
要小心題目抓字眼...
10/27 22:06, 3F

10/27 22:07, , 4F
如果只說tree..就沒有限制非要一點只有一個Parent node.
10/27 22:07, 4F

10/27 22:16, , 5F
但以B來說...用最簡單的判斷..root就沒有parent node...
10/27 22:16, 5F

10/27 22:17, , 6F
因為題目沒說「除了root節點之外」...
10/27 22:17, 6F

11/07 09:06, , 7F
謝謝大家喔 原來如此
11/07 09:06, 7F
文章代碼(AID): #178gmZr5 (TransCSI)