Re: [algogeeks]Numbers search in an array

2010-06-18 Thread Ashish Mishra
take one pointer to start n another to the end say a n b now if a +b X shift b towards left n so on On Fri, Jun 18, 2010 at 9:03 AM, sharad kumar aryansmit3...@gmail.comwrote: @arun:find out the difference x-arr[i] for all i=0..n hash it ...next search for a number with difference .u can

Re: [algogeeks]Numbers search in an array

2010-06-17 Thread Anurag Sharma
Its a repeated question. I would suggest you checking the archives of this groups for its solution. Anurag Sharma On Fri, Jun 18, 2010 at 8:05 AM, Arunkumar Sreenivasan thegame.a...@gmail.com wrote: Hi, You are given a set of numbers and another number 'x'. You have to find if there