[algogeeks] Re: Finding Repeated and Missing Numbers

2006-01-01 Thread Swadhin Sonowal
You are right. I made a mistake while typing the equation. Thanks. swadhin On 1/2/06, Vinodh Kumar [EMAIL PROTECTED] wrote: Hi, I think there is a small modification in the equations : X= (D2 + D1^2)/(2*D1) Y= (D2 - D1^2)/(2*D1) Vinodh

[algogeeks] Re: Finding Repeated and Missing Numbers

2005-12-21 Thread Swadhin Sonowal
S is the sum of the numbers from 1 to 10 other then X and Y ie the missing number and the repeating number S + X + Y = 10*(10+1) / 2 and in the input stream we dont have X rather an extra Y in that place so summing the numbers of the stream we get S + Y + Y On 12/21/05, ridvansg