[理工] 3題資料結構是非題
1.In object-oriented design,an object is a specific combination of data and
the method that can process and communicate of data.The type of an object is
defined by a class.
題庫本答案:true
自己的答案:false
自己的想法:感覺敘述中的object跟class要交換才對
2.The height of a tree is the maximun depth of its node,where the depth of a
node is the number of its ancestor.
題庫本答案:true
自己的答案:false
自己的想法:樹高應該是樹葉的祖先數目+1才對
3.Removing an edge in an adjacency-matrix graph takes O(1) time(n is the
number of vertices in graph).
題庫本答案:false
自己的答案:true
自己的想法:因為為相鄰矩陣,所以要移除哪個邊就直接把數值1改為數值0就好,
故為O(1)
------------------------------
題庫本答案也不一定是正確的 有時錯誤率滿高的...
但怕是本魯自己想法錯了 所以請各位高手解惑一下
謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.164.80.32
推
01/25 22:18, , 1F
01/25 22:18, 1F
→
01/25 22:20, , 2F
01/25 22:20, 2F
謝謝O大解惑!! 第一題其實沒很懂 但本魯直接記起來好了
※ 編輯: PPTHS 來自: 218.164.80.32 (01/25 22:28)
→
01/25 22:51, , 3F
01/25 22:51, 3F
→
01/25 22:59, , 4F
01/25 22:59, 4F
推
01/25 23:12, , 5F
01/25 23:12, 5F
→
01/25 23:17, , 6F
01/25 23:17, 6F
推
01/25 23:30, , 7F
01/25 23:30, 7F