[理工] [DS]98-中山資工

看板Grad-ProbAsk作者 (天佑台灣!)時間14年前 (2010/03/22 21:11), 編輯推噓3(302)
留言5則, 5人參與, 最新討論串1/1
Analyze the behavior of QUICKSORT in the case where a schizophrenic adversary picks the best possible splitter (partitioning element) instead of the worst ,every other time (ie, he alternates between best and worest). What running time is induced by this "adversary"? 題目不懂在問什麼? 還有請問如何解? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.115.4.6 ※ 編輯: ie925155 來自: 59.115.4.6 (03/22 21:11)

03/22 21:13, , 1F
阿就問你最佳解怎麼來的及時間複雜度吧?
03/22 21:13, 1F

03/22 21:14, , 2F
請問你知道middle of three嗎?
03/22 21:14, 2F

03/22 21:18, , 3F
知道 解決QSORT worst case的方法
03/22 21:18, 3F

03/22 22:02, , 4F
alternates? 我還以為是一下worst 一下best 交替計算> <
03/22 22:02, 4F

03/22 22:30, , 5F
樓上正解
03/22 22:30, 5F
文章代碼(AID): #1Bfsnawr (Grad-ProbAsk)