wu :: forums
« wu :: forums - Find 2 numbers in array whose sum is equal to x »

Welcome, Guest. Please Login or Register.
May 15th, 2024, 7:50pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: Eigenray, towr, william wu, SMQ, Grimbal, ThudnBlunder, Icarus)
   Find 2 numbers in array whose sum is equal to x
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Find 2 numbers in array whose sum is equal to x  (Read 1556 times)
puzzlefreak
Newbie
*





   


Posts: 6
Find 2 numbers in array whose sum is equal to x  
« on: Aug 24th, 2011, 1:05am »
Quote Quote Modify 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
puzzlefreak
Newbie
*





   


Posts: 6
Re: Find 2 numbers in array whose sum is equal to  
« Reply #1 on: Aug 24th, 2011, 10:03am »
Quote Quote Modify Modify

Sorry this question is already asked before :-
 
http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_cs; action=display;num=1216836886;start=2#2
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board