Find two elements in the array making the sum

Given a sum check whether the array contains two elements making the sum