Author |
Topic: Find 2 numbers in array whose sum is equal to x (Read 1566 times) |
|
puzzlefreak
Newbie


Posts: 6
|
 |
Find 2 numbers in array whose sum is equal to x
« on: Aug 24th, 2011, 1:05am » |
Quote Modify
|
Given an array, find first 2 numbers whose sum is equal to x. For eg :- consider an array :- [1,2,3,4,5,6,7,8,9,10] if x = 10, then 1+9 is the answer. (please don't use brute force approach)
|
|
IP Logged |
|
|
|
|