A θ(n log n)-time algorithm which determines whether there exist two elements in a set S of n integers whose sum is exactly some queried integer x.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.