LetAandBbe two sequences ofnintegers each. Given an integerm,
describe anO(nlogn)-time algorithm for determining if there is an integer
ainAand an integerbinBsuch thatm=a+b.
Given a set ofnintegers, describe and analyze a fast method for finding
the logn_ integers closest to the median.
Our quick-select implementation can be made more space-efficient by initially
computing only thecountsfor setsL,E, andG, creating only the new
subset that will be needed for recursion. Implement such a version.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here