相关问题: The kth quantiles of an n-element set are the k 1 order satatistics that divide the sorted set into k equal-sized sets(to within 1).Give an O(nlgk)time algorithm to list the kth quantiles of a set. 对一个含有n个元素的集合来说,所谓k分位数(the kth quantile),就是 ...
8-1(比较排序的概率下界) 在这一问题中,我们将证明对于给定的n个互异的输入元素,任何确定或随机的比较排序算法,其概率运行时间都有下界Ω(nlgn)。首先分析一个确定的比较排序算法A,其决策树为Ta,假设A的输入的每一种排列情况都是等可能的。 a) 假设Ta的每个叶子结点都标有在给定的随机输入情况下到达该结点的 ...