BETA

Check The sum of 2 elements in an array equal to X

 You have an array of n elements, and a sum. Check if any 2 elements in the array sum to the given sum.
Expected time complexity O(n).

Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer