[algogeeks] Re: Missing numbers

2009-08-01 Thread Devi G
@Vivek I had told abt tat border case already once.. Suppose the two missin numbers are greater than n, then m==0 when exitin the loop. So they will be n+1 and n+2 only. in case, one of the missin numbers is greater than n, then m==1, and can be simply found by subtracting the (array_sum+x[0] )

[algogeeks] Re: Missing numbers

2009-08-01 Thread ankur aggarwal
@all suming the 1 to n+2 or n will not solve this problem.. it may give overflow problem.. this is not the soln... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

[algogeeks] Re: Missing numbers

2009-08-01 Thread sharad kumar
we have got additional data typees to handle sir,like biginteger in java.string in c++ etc.its a linear programming problem sir. On Sat, Aug 1, 2009 at 6:12 PM, ankur aggarwal ankur.mast@gmail.comwrote: @all suming the 1 to n+2 or n will not solve this problem.. it may give overflow

[algogeeks] Re: Missing numbers

2009-08-01 Thread ankur aggarwal
@sharad then wat about memory wastage?? memory shud be taken care of.. On Sat, Aug 1, 2009 at 7:39 PM, sharad kumar aryansmit3...@gmail.comwrote: we have got additional data typees to handle sir,like biginteger in java.string in c++ etc.its a linear programming problem sir. On Sat, Aug

[algogeeks] Re: Missing numbers

2009-08-01 Thread sharad kumar
yes sir,bigint can handle till 100! or more .incase of overflow we can make use of string On Sat, Aug 1, 2009 at 8:00 PM, ankur aggarwal ankur.mast@gmail.comwrote: @sharad then wat about memory wastage?? memory shud be taken care of.. On Sat, Aug 1, 2009 at 7:39 PM, sharad kumar

[algogeeks] Re: Missing numbers

2009-08-01 Thread Prunthaban Kanthakumar
Try {2, 1} On Sat, Aug 1, 2009 at 11:45 AM, Devi G devs...@gmail.com wrote: @Vivek I had told abt tat border case already once.. Suppose the two missin numbers are greater than n, then m==0 when exitin the loop. So they will be n+1 and n+2 only. in case, one of the missin numbers is