freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計算機算法導(dǎo)論_第9章(完整版)

2024-11-24 10:17上一頁面

下一頁面
  

【正文】 stitute T(n) = Combine fractions Express in desired formWhat we set out to prove 36 11/12/2021 LinearTime Median Selection ● Given a “black box” O(n) median algorithm, what can we do? ■ ith order statistic: ○ Find median x ○ Partition input around x ○ if (i ? (n+1)/2) recursively find ith element of first half ○ else find (i (n+1)/2)th element in second half ○ T(n) = T(n/2) + O(n) = O(n) ■ Can you think of an application to sorting? 37 11/12/2021 WorstCase LinearTime Selection ● Intuitively: ■ Work at each level is a constant fraction (19/20) smaller ○ Geometric progression! 38 11/12/2021 LinearTime Median Selection ● Worstcase O(n lg n) quicksort ■ Find median x and partition around it ■ Recursively quicksort two halves ■ T(n) = 2T(n/2) + O(n) = O(n lg n) 39 11/12/2021 The End Exercises ● 。 q = RandomizedPartition(A, p, r) k = q p + 1。 ● 。 1 11/12/2021 Introduction to Algorithms 9 Medians and Order Statistics 2 11/12/2021 Order Statistics ● The ith order statistic in a set of n elements is the ith smallest element ● The minimum is thus the 1st order statistic ● The maximum is the nth order statistic ● The median is the n/2 order statistic ■ If n is even, there are 2 medians 3 11/12/2021 Selection Problem Input: A set A of n (distinct) numbers and a number i, with 1 ≤ i ≤ n. Output: The element x ∈ A that is larger than exactly
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1