看板 Grad-ProbAsk 關於我們 聯絡資訊
9.(b) http://ppt.cc/@vjH 12. http://ppt.cc/ZITI 9(b)的時間算法是直接用heap sort的時間複雜度O(nlogn) 2^30*30/2^25 = 960(sec) 是這樣嗎? 第12題完全不知道該怎麼下手@@ 請各位高手幫忙解答一下,感謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 180.176.168.15
juan19283746:12.BFS應該做的到吧 02/12 10:54
weiyung:不過要用哪一點做起點啊? 02/12 11:33
juan19283746:都做@@ 02/12 11:37
weiyung:都做的話是最後Path最長的那一條的長度即為diameter嗎? 02/12 12:00
annheilong:樹中最常path為diameter 有不同的ST, 找diameter最小 02/12 13:32
annheilong:想問一下...兩點之間的長度怎麼看啊? 圖上沒有數字? 02/12 13:32
plapla:他說距離的定義是Number of edges 02/12 15:17