Consider the problem:The input is a set S containing n real numbers and one real number x.Design an algorithm to determine whether there are two elements of S whose sum is exactly x.The alogorithm should run O(nlogn).Suppos e now that the set S is given in sorted order.Design an algorithm to solve the problem in time O(n).
could someone send me the algorithm for the above questions