Assuming it is possible to sortnnumbers inO(nlogn) time, show that it
is possible to solve the three-way set disjointness problem inO(nlogn)
time.
Describe an efficient algorithm for finding the ten largest elements in a
sequence of sizen. What is the running time of your algorithm?
Show that logb f(n) is (logf(n)) ifb> 1 is a constant.
Describe an algorithm for finding both the minimum and maximum ofn
numbers using fewer than 3n/2 comparisons. (Hint: First, construct a
group of candidate minimums and a group of candidate maximums.)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here