[理工] 資結

看板Grad-ProbAsk作者 (微笑的故事)時間11年前 (2012/09/28 23:50), 編輯推噓2(204)
留言6則, 3人參與, 最新討論串2/7 (看更多)
quick sort is the optimal sort of comparison based sort for different number. (F) 請問為什麼不對? average和best都是O(nlogn)符合comparison的定義,是不是問題出在optimal??? -- posted from android bbs reader on my samsung GT-I9003 https://market.android.com/details?id=com.bbs.reader -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 27.241.14.7

09/29 02:47, , 1F
QuickSort的Worst Case不好吧..
09/29 02:47, 1F

09/29 08:03, , 2F
所以optimal sort是worse O(nlogn)嗎
09/29 08:03, 2F

09/29 15:38, , 3F
comparison based在worst case最快可達Ω(nlogn),但quick
09/29 15:38, 3F

09/29 15:39, , 4F
sort在worst case是Θ(n^2),所以False。另外optimal是merge
09/29 15:39, 4F

09/29 15:40, , 5F
sort和heap sort。
09/29 15:40, 5F

09/29 16:41, , 6F
感謝!!!
09/29 16:41, 6F
文章代碼(AID): #1GPSTHqe (Grad-ProbAsk)
討論串 (同標題文章)
完整討論串 (本文為第 2 之 7 篇):
理工
2
2
理工
2
6
理工
2
8
理工
2
22
理工
1
16
理工
3
6
理工
3
9
文章代碼(AID): #1GPSTHqe (Grad-ProbAsk)