IntroductiontoAlgorithms3rdEdSolutions
Monday, March 4, 2013
9.3-8
›
Professor Olay is consulting for an oil company, which is planning a large pipeline running east to west through an oil field of n wells. ...
9.3-9
›
Let X{1..n] and Y[1..n] be two arrays, each containing n numbers already in sorted order. Give an O(lg n)-time algorithm to find the med...
Sunday, March 3, 2013
9.3-7
›
Describe an O(n)-time algorithm that, given a set S of n distinct numbers and a positive integer $k \leq n$, determines the k numbers in...
9.3-6
›
The kth quantiles of an n-element set are the k 1 order statistics that divide the sorted set into k equal-sized sets (to within 1). Gi...
Saturday, March 2, 2013
9.3-5
›
Suppose that you have a “black-box” worst-case linear-time median subroutine. Give a simple, linear-time algorithm that solves the selecti...
9.3-4
›
Suppose that an algorithm uses only comparisons to find the i th smallest element in a set of n elements. Show that it can also find the...
9.3-3
›
Show how quicksort can be made to run in O(n lg n) time in the worst case, assuming that all elements are distinct. The worst case for...
›
Home
View web version