[理工] 資料結構 時間複雜度
兩個問題 都是是非題
disjoint-set forest , unique element,wightrule is applied那 下面這個例子會成立嗎?
1.In the worst case, find an element in a set of size n take theta(logn)
在最糟情況find 還是可以保持趨近O(1)嗎?還有disjoint-set 有很多種find和union 那是要用哪一種來看還是,就用最好的find和union呢?
2.The complexity of a comparison based algorithm cannot be faster than O(nlogn)
如果非comparison based algorithm 可以突破nlogn,但是如果是Best case不可以了嗎? 像這題要考慮Best case嗎@@
-----
Sent from JPTT on my Sony D6653.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 115.82.135.229
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1516182494.A.3E0.html
→
01/17 17:53,
8年前
, 1F
01/17 17:53, 1F
→
01/17 17:56,
8年前
, 2F
01/17 17:56, 2F
推
01/17 18:33,
8年前
, 3F
01/17 18:33, 3F
→
01/17 18:33,
8年前
, 4F
01/17 18:33, 4F
→
01/17 19:45,
8年前
, 5F
01/17 19:45, 5F
→
01/17 19:45,
8年前
, 6F
01/17 19:45, 6F
→
01/17 19:45,
8年前
, 7F
01/17 19:45, 7F
推
01/17 20:45,
8年前
, 8F
01/17 20:45, 8F
推
01/17 22:14,
8年前
, 9F
01/17 22:14, 9F
→
01/17 22:14,
8年前
, 10F
01/17 22:14, 10F
→
01/17 22:14,
8年前
, 11F
01/17 22:14, 11F
推
01/17 23:35,
8年前
, 12F
01/17 23:35, 12F
→
01/17 23:35,
8年前
, 13F
01/17 23:35, 13F
討論串 (同標題文章)