二分查找,《算法导论》,习题2.3-5*Referring back to the searching problem(see Exercise 2.1-3),observe that if*the sequence A is sorted,we can check the midpoint of the sequence against v*and eliminate half of the sequence ...
《算法导论》,习题2.3-7*Describe a Θ(n lg n)-time algorithm that,given a set S of n*integers and another integer x,determines whether or not there exist two*elements in S whose sum is exactly x.*@author lihzh(苦逼coder)*...